zoho.crm._getRecords() in Zoho CRM
I've requirement as below,\
My Custom modules Names: Product Master, Jobs, Cost Center(like Product line items),
Accounts Products.
I've 50 products in Product Master module
So Whenever an Account is created in the Accounts, then in Accounts Products module, 50 records will be created with the same account name (Account name, Product name field in Accounts Products). Similarly, if a new product is added in Product Master then for that product records should be created for all accounts in Accounts Product module.
And if I have 10 Accounts and 50 products then, in Accounts Products module 500 records should be created. So I did this with custom function.
This is the code below,
----------------------
accdetails = zoho.crm._getRecordById("Accounts",accID.toLong());
info accdetails;
accname = accdetails.get("Account Name");
info accname;
prod = zoho.crm._getRecords("CustomModule4",1,200);
//info prod;
prodjs = prod.toJSONList();
//info prodjs;
//info "PRODUCT NAMES:-----------!";
for each eachprod in prodjs
{
pname = eachprod.get("CustomModule4 Name");
info pname;
creatrec = zoho.crm._create("CustomModule8",{"Account Name":accname,"Product Name":pname,"Account Products Name":accname + " " + pname});
}
-------------------------------------------
So in the code, prod = zoho.crm._getRecords("CustomModule4",1,100);
here we have to get records from other module, so the limit is max 200 records.
If I have 1000s of records then how should I fetch all records, and use the for loop to create the Accounts Products.