If you want to Create, Update, Read and Delete records in Zoho CRM in any module, please use the following code for the same:
var commonname = value.id;
var acc = ZDK.Apps.CRM.Accounts.fetchById(commonname);
var phone = acc.MobileNo;
var email = acc.Email;
var city = acc.City;
var channel = acc.Channel_Lookup_Id;
var terry = acc.Territory_Code_Lookup_Id;
var country = acc.Country
var state = acc.States;
var mktseg = acc.Market_Segment;
var mktGeo = acc.Market;
var zone = acc.Zone;
var region = acc.Region1;
if (channel != null) {
var channelD = ZDK.Apps.CRM.CM_Channel_Code.fetchById(channel);
var channelname = channelD.Name;
ZDK.Page.getField("Channel").setValue(channelname);
}
if (terry != null) {
var terryD = ZDK.Apps.CRM.CM_Territory_Code.fetchById(terry);
var terryName = terryD.Name;
ZDK.Page.getField("Call_territory").setValue(terryName);
}
ZDK.Page.getField("Market_Segment").setValue(mktseg);
ZDK.Page.getField("City").setValue(city);
ZDK.Page.getField("Phone").setValue(phone);
ZDK.Page.getField("Email").setValue(email);
ZDK.Page.getField("Zone").setValue(zone);
ZDK.Page.getField("Region").setValue(region);
ZDK.Page.getField("Market_Geography").setValue(mktGeo);
ZDK.Page.getField("State").setValue(state);
ZDK.Page.getField("Country").setValue(country);