Autofill subform generated from crm

Autofill subform generated from crm

I need to have a subform auto fill product information from crm. So far I have this script:

crmresp = zoho.crm.getRecordById("Products", row.Product_Name_ID);
row.Product_ID = crmresp.get("Product Code");

I put this in on user action in the subform field Product Name.