Custom Function: Refresh Page
Hello
I am calling a custom function from a Contact Form Button to update the
current contact (and other company contacts)
The following works nicely...but I need to reload the current page to
show the updated data on the contact page...
- accountId=input.companyid.toString();
- iaccountId=input.companyid.toLong();
- rec
= zoho.crm.getRecordById(("Accounts"),iaccountId);
- resp
= zoho.crm.getRelatedRecords("Contacts",("Accounts"),accountId);
- for
each ele in resp
- {
- mp=map();
-
mp.put("Mailing Street",rec.get("Shipping Street"));
-
mp.put("Mailing State",rec.get("Shipping State"));
-
mp.put("Mailing City",rec.get("Shipping City"));
-
mp.put("Mailing Zip",rec.get("Shipping Code"));
-
mp.put("Mailing Country",rec.get("Shipping Country"));
- contactId=ele.get("CONTACTID");
-
updateResp = zoho.crm.updateRecord("Contacts",contactId,mp);
- }
**** This line of code is not working. Any suggestions?
- openUrl("https://crm.zoho.com/crm/EntityInfo.do?module=Contacts&id="
+ input.contactidforrefresh,"Parent window","");