How to get records with the same lookup of another module?
Dear All,
I have a custom module 'Bill' which has (except of the other fields) one 'mandatory' lookup field (from the Purchase Order module) with the name 'Related Purchase Order'.
This lookup field is a Single Line in the Purchase Order Module.
With the custom function (in Bill module) I would like to get all the bills which have the same 'Related Purchase Order'.
So what I have done in the function is
- billDetails = zoho.crm.getRecordById("Bills",billId.toLong());
- getRelatedPO_ID = ifnull(billDetails.get("Related_PO"),"");
- getRelatedPO = Map();
- getRelatedPO.put("Related_PO",getRelatedPO_ID);
relatedBills = zoho.crm.getRecords("Bills",1,10,getRelatedPO);
info relatedBills;
But this code returns me again all the 'Bill' records. What I am doing wrong?