Discussions
Error Using Case Function in Custom Field
Recently, rules for our grant applications changed and now our applications expire 9 months after the date of submission of the application whereas before they expired 12 months after the date of approval. I have a custom field for each of the submission date and the approval date, now I would like a field that automatically calculates the expiration date. Here's what I have so far:
CASE WHEN ({custentity1}<=’09212009’,’MMDDYYYY’) THEN (ADD_MONTHS({custentity2}, 12)) WHEN ({custentity1}>=’09222009’,’MMDDYYYY’) THEN (ADD_MONTHS({custentity1}, 9)) END
The ADD_MONTHS function works properly, but I need it to populate differently based on whether the application was submitted prior to 9/21/09 or after. Right now I am getting an "Invalid Expression" error.