Hi,
When Summary change trying to set Due date after 7 days on creation. SetformValue is not setting the value to due date. What I am doing wrong
def sumField = getFieldById(getFieldChanged())
log.debug("summaryField value" + sumField)
def dueDate = getFieldByName("Due Date")
if(sumField.value){
Date dateNow = new Date(new java.text.SimpleDateFormat("dd-MMM-yyyy").format(new Date()+7))
sumField.setFormValue(dateNow)
log.debug("Date Now" + dateNow)
}else{
}
Any advise.
Thanks,
Om
Hi Om,
I think you are trying to set the due date after 7 days of creation but in the script, you are using the .setFormValue() method on the summary field.
Try
dueDate.setFormValue(dateNow)
instead.
Thanks and regards,
Anzar
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.