Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CubeYogi/f9a9ddf8e3e57a10e126a484da19e855 to your computer and use it in GitHub Desktop.
Save CubeYogi/f9a9ddf8e3e57a10e126a484da19e855 to your computer and use it in GitHub Desktop.
//Validating Billing Email
if(billing_email != null && billing_email.trim() != "")
{
//Validating account ID
if(account_id != null)
{
//Putting billing_email in the update map
update_map = Map();
update_map.put("Billing_Email", billing_email);
//Updating Account Entry
update_account = zoho.crm.updateRecord("Accounts", account_id, update_map);
info update_account;
if(!update_account.isEmpty() && update_account.containKey("status") && update_account.get("status") == "error")
{
info "Error in updating Account: "+update_account;
}
else
{
info "Account updated successfully";
}
}
else
{
info "Invalid Account ID passed";
}
}
else
{
info "Billing Email is empty";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment