cancel
Showing results for 
Search instead for 
Did you mean: 

Lock the agreement status field

Former Member
0 Kudos

Hi All,

Can we lock the agreement status field in UI of master or sub agreement.

I want to lock that field while its status moved to "Executed".

If any one of you have idea please share with me.

Thanks,

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Alex,

Yes, the agreement for both master and sub status field can be locked. The locking of the field has to be done through scripting.

If you are familiar with scripting, you need to create a script for Master Agreement class on the save or validate event of the document and put a conditional statement lock the Status field when the value of the status is 'Executed'.

Here is sample code that might help.

Make sure the script is created on MA Validate or MA Save event of scripting.

strEXECUTED = "Executed";

String status = doc.getStatusRef().getDisplayName(session);

if strEXECUTED.equals(status)
IapiDocumentLockManager.lockField(session,maBean,"STATUS");

Regards,

Parankush