If you are working with ZOHO api then you need multi or single lookup field for relationship between two modules. Relationship mean linking two module using zoho lookup field and there is two type of lookup field single and multiselect.
You are adding record using CRM then you not have any problem but when you are using API thought then some time causing problems because all document we have not find and some document is complex for us to understand so that’s why im describe you in below about ZOHO lookup field api.
So first need to add below is lookup fields
CRM > Click on Setting (Top right second last button) > DEVELOPER SPACE > Click on API > click on API Name tab and then you need to again click on module which is you wan to customize to see fields manager screen.
So you can run API using many programing language you just need Authentication token comment me if you want want to understand and also my last PHP zoho api code will helpful.
Now this time we are do code in zofo function and you can execute that function in zoho automation for automatic add records when specific value found or delete record when value is bla…bla…. so there is many why we can use on next article we will see about.
Now we go for creating function in zoho so you first need to login in zoho
CRM > Click on Setting (Top right second last button) > DEVELOPER SPACE > Click on function > add New function to see below popup
Okay that’s done now we have a question how to write and add lookup field data. I describe you one example is need to add all contact in company multi lookup field
/*
Below two field you can pass using function argument like if company create then selected account all contact copy into contacts looup field in company
*/
accid="ACCID";
id="Company ID";
//Here we need to add company id
res_1 = zoho.crm.getRelatedRecords("Contacts","Accounts",accid);
// getting all contact data of associated within a account id
//ZOHO foreach to get record one by one in function
for each rec in res_1
{
ID = rec.get("id"); //get contact id
cp = Map(); //Mapping work same as array
cp.put("Contacts",ID); // Need to two module API name
cp.put("Company",id); //Company API Name
/*
Now we are adding/creating relationship between two module
You need to define module api name as below this is very important
<MODULE1>_X_<MODULE2>
*/
create = zoho.crm.createRecord("Company_X_Contacts",cp);
}
Example auto add contact when we create a new company so benifit is if we have 100 contact in 1 company then we need to select and associate with this field but above function will do quickly and no need to select
For more information or help drop me comment i will fi your issue and help you or looking other API then also you can contact me i will create a article for you.
Jorge Zegarra says
Buenos días
Una consulta.
Es posible haer que un boton en el mismo ZOHO pueda enviar datos a otra página web o a un web service?
Por favor necesito ayuda en ese tema.
Gracias
Parbat Pithiya says
Thanks for your comment,
Yes possible we can add custom button on ZOHO CRM. using custom app also we can set hook on that button to send data on any URL.
I just drop you mail for more information
Thanks