Created
November 25, 2017 05:33
-
-
Save jeznag/536c64ac94f762f8057633113b0a79ae to your computer and use it in GitHub Desktop.
custom related list in Zoho CRM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string getProductsFromPurchaseorder(string purchase_order_id) | |
{ | |
purchase_order_record = zoho.crm.getRecordById("PurchaseOrders",input.purchase_order_id.toLong()); | |
line_items = purchase_order_record.get("product").toJSONList(); | |
xml_for_related_list = "<record>"; | |
idx = 0; | |
for each line_item in line_items | |
{ | |
line_item_map=line_item.toMap(); | |
xml_for_related_list=((xml_for_related_list + ("<row no='" + idx + "'><FL val='product name'>" + line_item_map.get("Product Name")) + "</FL><FL val='quantity'>") + line_item_map.get("Quantity")) + "</FL></row>"; | |
idx=(idx + 1); | |
} | |
return xml_for_related_list + "</record>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment