on 09-16-2014 1:06 AM
We have a script that automatically calculates the expiration date. However, we now have a business need to set the perpetual flag. This is causing the script to error out. Please see the script attached. Any suggestions of how to check for and exclude if the perpetual flag is set would be welcome. Thank you.
Hi Christopher,
Can you share the error message which you got.
And also, in the script you mentioned as "fieldMetaData2 = doc.getFieldMetadata("P_CAN_PENALTY");".Is P_CAN_PENALTY the internal name of the Perpetual flag?
Regards,
Vignesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vignesh
P_CAN_PENALTY is a custom field unrelated to the perpetual flag. There is a system standard check box that indicates whether an agreement is perpetual or whether it has an expiration date. I just do not know how to bring check and validate whether the perpetual flag is set.
The error message is a fairly generic message "You cannot set an expiration date for a perpetual contract. If you want the contract to expire on a specific date, deselect Perpetual Terms and enter the expiration date." and it occurs because the script is attempting to default an expiration date based on the effective date of the agreement.
Thank you
Christopher
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.