cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable/lock (Delete/Trash Icon) when Contract Document is Executed

Former Member
0 Kudos

Hi All,

I am trying to disable trash icon on Contract Documents tab for a particular contract document item that is in "EXECUTED" phase.

I tried setting security profiles , access attributes for "Contract Generation". I had set DELETE - ALLOW and ADMINISTRATIVE DELETE - DENY.

As per one of the post I found, that

Security profiles are configured in setup on the system administration tab. There are 2 "rights" associated with Contract Documents that apply to this situation:

1) Delete

2) Administrative Delete

The first access right indicates whether or a not user can delete contract documents up until they are executed. The second access right provides for the delete option even after the contract documents are executed.

To address your use case, you should make sure that users have the Delete access right in one or more of their associated security profiles and make sure they do not have the Administrative Delete access right.

But when I tried the same, edit option is also disabled on Contract Document item. Edit was set to ALLOW although.

Please suggest if I am missing something.

Thanks,

Saloni

Edited by: Saloni on Nov 10, 2011 10:23 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Some of the roles are updated based on the Application User security profile. Please check if the App user role provides the delete access and hence the value for deletion is getting inherited from that role.

Note that App user profile is granted to all users by default. However this behavior can be changed.

Hope this helps,

Vikram Shukla

Former Member
0 Kudos

Hi Saloni,

Another thing to note is that whether you are trying to do version delete on the Contract document UI or deletion of the contract document itself on the contract documents tab? The behavior differs in both cases.

Thanks,

Vikram Shukla

Former Member
0 Kudos

Hi Vikram,

I am trying to disable only trash icon(DELETE) on Contract Document Tab. Right now its disabling edit icon as well on Executed status.

What is the default behaviour when a contract document reaches executed phase? If its locking the contract document thereafter then is it possible and correct to make edit option enabled?

Please suggest.

Thanks,

Saloni

Former Member
0 Kudos

Hi Saloni,

Once the contract document reaches the Executed phase, the fields become disabled. Meaning you cannot make any more changes to the "meta data" on the contract document such as Effective Date, Expiration date etc. The only field that is open for addtion at this time is the "Final Signed document" to allow users to upload the final signed version of the contract document on the UI.

Having said that, you CAN go inside the contract document UI via the pencil icon available on the contract documents tab. Are you saying that even the pencil icon is disabled?

Thanks,

Vikram Shukla

Former Member
0 Kudos

Yes, the pencil icon is disabled.

Former Member
0 Kudos

I see, we will then need to decipher this via the tweaks in Security profile. This will be a tad tedious.

Goto Setup > Accounts and Security > Security Profile and pull up the security profile that you are trying to change.

Then goto the Access rights tab and pull up the Business documents section. Goto Page 2 and check if the Master Agreement Edit is set to Allow or not. If not, then make it Allow

next, pull up the contract document profile from the list and make sure the Contract document Edit is set to Allow. On the same page, Document version Edit should also be set to Allow.

Let me know if this helps. Also, make sure that after you make the profile changes to log out of the system and clear the cache via System admin before you re-login.

Vikram

Former Member
0 Kudos

Hi Vikram,

The EDIT Icon was enabled now, but all the fields are locked in Contract Document. File upload is also disabled. Is there any option to allow file upload?

Thanks,

Saloni

Former Member
0 Kudos

I am not sure why but you can try this:

Pull up the contract generation Access Rights page, make sure that the Document version Create, View and Edit should all be set to Allow.

Hope this is helpful,

Vikram Shukla

Former Member
0 Kudos

Hi Vikram,

It didnt work. What is difference between Contract Document and Document Version in Contract Generation option of Security profiles?

Thanks,

Saloni

Former Member
0 Kudos

Hi Vikram,

Please help me with how to delete cache?

Thanks,

Saloni

Former Member
0 Kudos

Hi Vikram,

After I make the following settings in Security Profile,

Contract Generation-->Contract Document --> Create - Allow, View - Allow, Edit - Allow, Delete - Allow, Administrative Delete - Deny

Contract Generation-->Document Version --> Create - Allow, View - Allow, Edit - Allow, Delete - Allow, Administrative Delete - Allow

Below is the output,

All trash icon on Contract Document Tab are disabled.

Edit icon is enabled now for Executed phase contract document.

File upload is disabled on Contract Document UI.

Please guide me to disable trash icon for only EXECUTED phase documents and enable File upload on edit.

Thanks,

Saloni

Edited by: Saloni on Nov 11, 2011 2:28 PM

Former Member
0 Kudos

Disable trash icon for only EXECUTED phase documents:

For this,

Contract Generation-->Contract Document --> Delete - Allow, Administrative Delete - Deny

Contract Generation-->Document Version --> Delete - Allow, Administrative Delete - Deny

let me know if this works. I am not sure about enabling File upload on edit. These settings should have enabled that I would think. Request others to provide their inputs if this still doesnt solve Saloni's issue.

Thanks,

Vikram

Former Member
0 Kudos

Hi,

Its not working.

Anybody having any idea, please suggest.

Thanks,

Saloni

Former Member
0 Kudos

Hi,

Issue was resolved. i.e., Trash Icon(delete) is disabled on Contract Document Tab when contract reaches EXECUTED phase. Also, only file upload was allowed on Contract Document UI.

It wasnt working before as documents were locked by script code and were not being affected by changes made on security profile settings. Creating a new contract it worked.

I have query that what is default behavior when contract is in DRAFT, SUPPLIER DRAFT phase. Is document DELETE enabled/disabled?

Thanks,

Saloni

Former Member
0 Kudos

Hi Saloni,

Thank you for letting us know that the issue was more to do with the script than the Security profile settings.

Default behavior for contract document Delete is enabled for the phases that you mentioned. Again, the security settings are phase specific for 2 scenarios only - Executed phase and non - Executed phase. There is no setting which controls specific phases such as Draft, In negotiations, Supplier Draft etc.

Hope this helps,

Vikram Shukla

Former Member
0 Kudos

Hi Vikram,

After setting Security Profiles for Contract Generation>Contract Document>DELETE allow and Administrative Delete to DENY, Trash Icon is disabled for all contract documents watsoever phase they are. And is enabled for all contracts if Administrative Delete is set to Allow.

It is not behaving to enable Trash Icon until its in EXECUTED phase.

So, I am trying to implement using script. I wrote below code that didnt work,

contractDocumentList = agreeBean.getContractDocuments();

for(Iterator iterator2 = contractDocumentList.iterator(); iterator2.hasNext();)

{

ContractDocumentIBeanIfc contractDocument = (ContractDocumentIBeanIfc)iterator2.next();

ContractDocumentHome = contractDocument.getIBeanHomeIfc();

if (contractDocument.getCurrentPhase().getDisplayName(session).equals("Executed")) // string compare to check executed

{

//IapiDocumentLockManager.lockDocument(session,contractDocument );

IapiDocumentLockManager.lockField(session,contractDocument ,"Delete");

}

}

Any idea what is the ID for Trash Icon?

Please suggest.

Thanks,

Saloni

Former Member
0 Kudos

Hi All,

Issue was resolved with same settings that is Delete> Allow and Admin Delete>Deny when set for all profiles of user.

Reply from SAP that Delete option is active only for Draft phase. As soon as document has phase change, delete option is inactive. So, all phases after Draft phase of a contract document were having trashcan Icon as disabled.

Regards,

Saloni