Update Date Field through workflow and custom function
Hi,
I have a pick list field called Elite Trial Status and when the value in this field changes to Active I want a date field called Current Elite Expiry to be updated with today's date + 1 month.
I have created a workflow that triggers when the Elite Trial Status field is set to Active.
I have created the following custom function:
voidEliteTrialExpiry2(Date CurrentEliteExpiry,Int contactId)
contactIdStr = contactId.toString();
CurrentEliteExpiry = zoho.currentdate.addMonth(1);
mp = Map();
mp.put("Current Elite Expiry",CurrentEliteExpiry);
respond = zoho.crm.updateRecord("Contacts",contactId,mp);
But somehow this is not working. What am I missing here?
And one additional question:
What if in a similar scenario I wanted the date field to be updated not from today's date, but from the current date in the field?