Hello:
Last year I requested assistance in copying a date value from the Deal record to the Account record and this group was super helpful in giving me a function to use. Now, as I'm trying to copy a date from the Account record to the Deal using the same (but updated with new values) function, it's not working. I keep receiving an error that the field it's copying from is empty even though it's not. I'm sure I'm making a really obvious and silly mistake and was hoping this group could help me see where I went wrong.
API names for fields are below. Both are date fields.
Accounts: "Last_Purchase_Date"
Deals: "Last_Purchase_by_Account"
Arguments: dealID = Deal ID
rec = zoho.crm.getRecordById("Deals",dealID);
resp = zoho.crm.getRelatedRecords("Accounts","Deals",dealID);
lastDate = resp.get("Last_Purchase_Date").toDate();
mp = Map();
mp.put("Last_Purchase_by_Account",lastDate);
updateRec = zoho.crm.updateRecord("Deals",dealID,mp);
info mp;
info updateRec;
Thanks in advance!