Our ‘On Load of Form’ Workflow

We will program the CRM button to pre-fill the Deal ID field. So, “on load of the form”, we want to take that Deal ID to search for and grab the actual CRM Deal record and then pull its data into the corresponding form fields we created (Deal Name, Closing Date, Amount, etc.)

NOTE: In order to test your form, if you’re planning on pre-populating data in via a button or other link, you’ll need to “pre-fill” your hidden ID fields using URL parameters. If you, from the ‘Edit’ view of your form, click on the blue ‘Access Development Live’ button in the top right and then append your URL parameter (e.g. “?Deal_ID=1111122222333334444”) it will work. It WILL NOT work, however, if you, in environments, click ‘Access’ under the Development environment.

dealRecord = zoho.crm.getRecordById("Deals", input.Deal_ID.toNumber());
// info dealRecord;
amount = dealRecord.get("Amount");
dealName = dealRecord.get("Deal_Name");
input.Deal_Name = dealName;
input.Amount = amount;
input.Closing_Date = dealRecord.get("Closing_Date");
hide Note;
hide Task_Subject;
hide Priority;
hide Due_Date;
info "priority value: " + input.Priority;
Back to Lesson