on 01-16-2015 10:19 AM
Dear Experts,
in the Agreement object I am trying to implement a script at Field Data Edit event in which I want to change the value of newFieldValue.
The set up is the following - when agreement is created ( I am checking for TRUE in doc.isObjectAccessModeNew()) I want the field STORAGE_LOCATION to be empty. I use the variables fieldValue and newFieldValue to check if I have any value. Normally I have null for fieldValue and for example "ID 123" for newFieldValue. Now I want to change the value of newFieldValue also to null (or empty string). I tried using doc.setStorageLocation() however this does not change the value in the end.
Please advice how can I modify the value of newFieldValue so that the modification persist also after the script finishes.
Thanks,
Venelin
Hi Venelin,
In your case, instead of going for 'field data edit' context, I think an easier approach would be using the 'Document Lifecycle event' context for the target- Created. And as you always need the storage location field value as 'null', just try using doc.setStorageLocation("");
Hope this helps. Please let me know.
Best Regards,
Lopita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lopita,
Thanks for the answer.
I have tried using what you suggest, however it doesn't seem to affect the initial value of StorageLocation. I have created subAgreement from MasterAgreement and still the StorageLocation was inherited from the MasterAgreement and was not reset to "". I assume (and also have not found) that there isn't a separate class for SubAgreements?
Thanks
Venelin
Dear Kushagra,
my requirement is the following: I start creating Sub Agreement (click ADD in the Agreement tab of Master Agr.), then when the initial screen for the subagreement shows (before saving or anything), to have the storage location set to "" or null.
If I use the Create event, I believe that the script will trigger only after SAVE. I would like to have it set to null when the create screen is displayed - before SAVE.
Thanks in advance for any tips / suggestions.
Regards,
Venelin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.