How to Create, Update, Read and Delete records in Zoho CRM.

How to Create, Update, Read and Delete records in Zoho CRM.

If you want to Create, Update, Read and Delete records in Zoho CRM in any module, please use the following code for the same:

Code:

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);
    • Related Articles

    • How to fetch & update records in Sub Form in Zoho CRM.

      If you want to fetch & update records in Sub Form in any module of Zoho CRM. Please use the following code: Deluge Code: data = zoho.crm.getRecordById("Asset_Master",ID);//fetchRecord sub = data.get("Contract_Information");//AccessSubbform ...
    • How to Create an RFQ process in Zoho CRM.

      Task: A process to send RFQ (Request for Quote) to the vendor which is then filled by him to generate a RFQ record in Zoho CRM. (e.g., “By following the instructions, you’ll be able to achieve below steps smoothly” “This article will help you set up ...
    • How to Create a Task and Populate a Custom Date/Time Field with a TAT.

      Task: We first create a task based on lead status change. We will be then populating a custom date/time field which can be used as a TAT. The TAT will be adjusted according to the users shift hours and working days. Prerequisites (if applicable): ...
    • How to auto capture date in any module of Zoho CRM (T+15)

      User wants the date should capture as T+15 in any module of Zoho CRM. Deluge Code: Cdate = zoho.currentdate.addDay(15).toString("YYYY-MM-dd"); Zoho Link: https://www.zoho.com/deluge/help/functions/date-time.html
    • How to set a field as read-only using client script

      Task: Writing a client script for a different inbuild function based on different seniors/events. Prerequisites (if applicable): You should have a basic understanding of how to create and manage client scripts in your application. Instructions: Step ...