Skip to Content
Former Member
Nov 14, 2013 at 02:18 PM

Script not working for Master Agreement saving event


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