Hi, I have two modules named as CustomModule1 and CustomModule2. Both have same fields but CustomModule2 has an extra field named as Company Lookup. It is a lookup field in whcih we select company and save, all other fields are auto-populated with same values as in CustomModule1 object.I have written a custom workflow on CustomModule1 which calls built-in function getRecordById(companyID) which fetch record of the parameter companyID. And then I store fields values in local variables, Now I call another built-in function Create(CustomModule2, {Map values}) which creates an object of CustomModule2 on create/edit event of CustomModule1.
Now I want to create object of CustomModule2 from workflow in CustomModule1 that have been described above and want to assign the company data in CompanyLookup field that exists in CustomModule2, then all other fields will be auto-populated on the basis of lookup field value.
My customFunction is :
void ExportData (int companyID ) Edit Arguments
wholeRecord = zoho.crm.getRecordById("CustomModule1" ,input.companyID ) ;
name = wholeRecord.get("CustomModule1 Name") ;
email = wholeRecord.get("Email") ;
ID = wholeRecord.get("CUSTOMMODULE1_ID") ;
exportedRecord = zoho.crm.create("CustomModule2" ,{ "CustomModule2 Name" : "awaod", "CompanyLookup" : "Apple", "CompanyLookup_ID" : "1850640000000115180" } ,2 ) ;
How can I do that?
Any help will be appreciated.