Extracting Custom Fields From "users"
I have a custom field in the users module called "Agent Commission" which is a number field but is the agent's commission % so we just write 75 meaning 75% and I have another custom field in "Deals" called "Projected Agent Commission"
I' m trying to call the Agent Commission field in the users field to write a custom script to multiply the
"Agent Commission" by the deal price to display the "Projected Commission" amount in the Deals module.
So far I have this:
//retrieves the deal
DealRecord = zoho.crm.getRecordById("Deals",DealID);
//below retrieves the net commission field from the deal module
NetCommmsion = DealRecord.get("Total_Net_Commission_To_Office");
//below retrieves the deal record owner id
DealOwnerID = DealRecord.get("Owner").get("id");
//below retrieves the user record
AgentRecord = zoho.crm.getRecordbyId("users",DealOwnerID);
After the last step I'm unable to extract the custom field for "Agent Commission"