Populate other form fields based on a dynamic Dropdown selection

Populate other form fields based on a dynamic Dropdown selection

I am using a dynamic Dropdown field to pull in filtered records from the CRM Vendor module e.g.
  1. CRMresponse = zoho.crm.searchRecords("Vendors","(Vendor Name|starts with|A*)");
  2. for each vrs in CRMresponse
  3. {
  4. Dropdown:ui.add(vrs.get("Vendor Name"));
  5. }


I now need to Auto-populate other Form fields based on the selection made within this drop down.
e.g. pull in the "Email", "Phone" etc fields from CRM for the selected Vendor

It can easily be done using a 'ZOHO CRM' lookup filed type, by referencing the 'Field ID' value
reference  https://www.zoho.eu/creator/help/fields/crm-sampleapps.html

But how can this be done for a dynamically filled Dropdown? 

Is there any way 'On User Input' to get the "VENDORID" for the Dropdown selection, so we can then pull in the related CRM fields?

Any suggestions greatly appreciated.

Thanks