cancel
Showing results for 
Search instead for 
Did you mean: 

Script not working for Master Agreement saving event

Former Member
0 Kudos

Hello Experts

We have a requirement where display name of master agreement needs to be set by scripting .

I have written a script which works while saving of MA . This script will override the default name of MA and set some value in "Name" field of MA .  However , my observation is - the script is working on saving of MA and setting the correct value in "Name" field of MA but when I go out of the MA and come back again , I can see the old value onlly , i.e - the script value was not saved so the old value in the name field is displayed .

Example - master agreement name was - "000123"  and on saving of MA the script set the value " My Test " . Now after saving the MA if I go out of it and open once again , it displays "000123"  .

The mothods I tried  -

doc.getFieldMetadata("DISPLAY_NAME").set(doc, "My test");

doc.setDisplayname("My test");

But none seems to be working .

Thanks in advance for your input

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sudipta,

If I understood your problem correct, you are trying to rename the master agreement name.

For this use doc.setDisplayName(test).

Use this method in Master agreement validation script.

Hope this helps you.

Thanks

Krish

Former Member
0 Kudos

Thank you so much Krish !

This works for me .

Answers (0)