Copying Subform Data from Lead to Custom Module on Conversion
Hi,
I've written a deluge function to create a new module "Merchants" on conversion of a lead. This module will hold data from the lead and will also need to copy data from the subform on the lead "Payment Terminal" to the subform on the new module "Payments_Terminals".
I'm getting the following error when running the code;
Failed to execute function
- Data type of the argument of the function 'get' did not match the required data type of '[BIGINT]' Line Number:87
I have narrowed the issue down to this section of the code;
customerMap.put("Email",Lead.get("Email"));
sub_forms = List();
subinfo = ifnull(Lead.get("Payment_Terminal"),"");
info subinfo;
for each rec in subinfo
{
subform = Map();
subform.put("Terminal",subinfo.get("Terminal").get("id"));
subform.put("Quantity",subinfo.get("Quantity"));
sub_forms.add(subform);
info sub_forms;
}
customerMap.put("Payments_Terminals",sub_forms);
info customerMap;
create = zoho.crm.createRecord("Merchants",customerMap);
info create;
//}
Does anyone know why this is happening? I presume this is e because the subform has a look up to products "Terminal" and this likey where I'm going wrong!