Hi All ,
I have a custom field "Target Implemintation Date" which is on the customer screen, I have created a validation on the create Transition that will compare the date it have to be more than 14 days in the future, otherwise it won't create the issue.
I used a "custom Script Validator" with the following code, but nothing happanes, please help.
Hi @tamer_afifi
First, I may suggest some changes in your code.
Don't use the getCustomFieldObjectByName() method as it's deprecated. Instead, you can use the below code to get the custom field by its ID value (simply replace 'xxxxx' with your custom field long ID value.
def targetDateField = customFieldManager.getCustomFieldObject("customfield_xxxxx")
throw new InvalidInputException("please change the date to be at least 14 days in the future")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.