Function with lookup field to update a field
Hi,
I want to update the name of a record based on 2 lookup field in this record.
It's working : I have a workflow with this function :
- resp = zoho.crm.getRecordById("Referencement_expert",Referencement_expert_ID);
- Er = resp.get("Expert_refere");
- Cr = resp.get("Contact_a_qui_on_refere");
- // Create the new Name field value
- name = Er + " - " + Cr;
- // Update the record with the new Name value
- mp = Map();
- mp.put("Name",name);
- update = zoho.crm.updateRecord("Referencement_expert",Referencement_expert_ID,mp);
- info update;
My problem seems to be with the lookup field.
Zoho return something as a Json so it return everything.
Exemple :
I want to have: "John Doe - Jo Moe",
I get
{"name":"John Doe","id":"499867000023328784"} - {"name":"Jo Moe","id":"49986700002332659"} in my name field.
How can it return only the name like in my example?
Thanks