For Zoho Services only:


I'm actually part of something bigger at Ascent Business Solutions recognized as the top Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions offer support for smaller technical fixes and projects for larger developments, such as migrating to a ZohoCRM.  A team rather than a one-man-band is always available to ensure seamless progress and address any concerns. You'll find our competitive support rates with flexible, no-expiration bundles at http://ascentbusiness.co.uk/zoho-support-2.  For larger projects, check our bespoke pricing structure and receive dedicated support from our hands-on project consultants and developers at http://ascentbusiness.co.uk/crm-solutions/zoho-crm-packages-prices.

The team I manage specializes in coding API integrations between Zoho and third-party finance/commerce suites such as Xero, Shopify, WooCommerce, and eBay; to name but a few.  Our passion lies in creating innovative solutions where others have fallen short as well as working with new businesses, new sectors, and new ideas.  Our success is measured by the growth and ROI we deliver for clients, such as transforming a garden shed hobby into a 250k monthly turnover operation or generating a +60% return in just three days after launch through online payments and a streamlined e-commerce solution, replacing a paper-based system.

If you're looking for a partner who can help you drive growth and success, we'd love to work with you.  You can reach out to us on 0121 392 8140 (UK) or info@ascentbusiness.co.uk.  You can also visit our website at http://ascentbusiness.co.uk.

Zoho Deluge - Update Creator from CRM

What?
This is an article documenting how to update Creator from a workflow written in a Deluge Script held in ZohoCRM.

Why?
I've also started this article to document an issue we encountered where our code was as per the documentation provided, and the responses returned as successful, but the target fields did not update. This was as a result after changing the owner of the Creator app to another person and adding our previous Super Admin account as a "Developer".

How?
I'm going to demo two methods here using the <connection_link>

Setup the Connection Link
  1. Login to ZohoCRM as the creator super admin/owner (might not be the same as CRM super admin!!!)
  2. Go to Setup » Developer Space » Connections » Create Connection » Zoho
  3. Ensure you enable/tick "ZohoCreator/creatorapi".
  4. Note the name that you call it (displayed in mixed case but will be used in its lowercase form)

Method #1: Using UpdateRecords() function with Connection Link:
  1. The syntax for this is
    copyraw
    response = zoho.creator.updateRecord( ownerName, appLinkName, formLinkName, id, dataMap, connectionlinkName);
    1.  response = zoho.creator.updateRecord( ownerName, appLinkName, formLinkName, id, dataMap, connectionlinkName)
      Where
    • ownerName is the owner of the Creator app.
    • appLinkName is the name of the Creator app.
    • formLinkName is the name of the Creator form.
    • id is the Creator ID of the record.
    • dataMap is the map() to post.
    • connectionLinkName is the connection link obtained previously (as a string).
  2. For example:
    copyraw
    v_RecordID = "1234567890123456789".toLong();
    m_Params = Map();
    m_Params.put("FieldToUpdate", "ValueToUpdateWith");
    m_response = zoho.creator.updateRecord( "myAdminAccount", "myApp", "myForm", v_RecordID, m_Params, "myzohocreatorconnection");
    1.  v_RecordID = "1234567890123456789".toLong()
    2.  m_Params = Map()
    3.  m_Params.put("FieldToUpdate", "ValueToUpdateWith")
    4.  m_response = zoho.creator.updateRecord( "myAdminAccount", "myApp", "myForm", v_RecordID, m_Params, "myzohocreatorconnection")
  3. Successful Response:
    copyraw
    {
      "criteria": "ID==1234567890123456789",
      "newvalues": [
        {
          "FieldToUpdate": "ValueToUpdateWith"
        }
      ],
      "status": "Success"
    }
    1.  { 
    2.    "criteria": "ID==1234567890123456789", 
    3.    "newvalues": [ 
    4.      { 
    5.        "FieldToUpdate": "ValueToUpdateWith" 
    6.      } 
    7.    ], 
    8.    "status": "Success" 
    9.  } 

Method #2: Using API v1 (using JSON not XML)
  1. Generate AuthToken:
    1. Browser Mode: Open a browser to https://accounts.zoho.com/apiauthtoken/create?SCOPE=ZohoCreator/creatorapi
    2. OR API Mode: https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=ZohoCreator/creatorapi&EMAIL_ID=<email_address>&PASSWORD=<password> where you enter your own email address and zoho password.
  2. Determine the EndPoint:
    1. Following the syntax: https://creator.zoho.com/api/<ownername>/<format>/<applicationName>/form/<formName>/record/update where ownername is the owner, format is the type (I prefer JSON), applicationName is the name of your app, and form name the Creator form name. If you are on the EU or COM domain, enter this as the TLD of your endpoint (eg. creator.zoho.eu or creator.zoho.com).
    2. For example: https://creator.zoho.eu/api/myAdminAccount/json/myApp/form/myForm/record/update
  3. The code to update a form (sample data for demonstration purposes). Note that the payload here is submitted through URL parameters:
    copyraw
    v_AccessToken = "123abc456def789abc123def456abc";
    v_Criteria = "ID=1234567890123456789";
    v_EndPoint = "https://creator.zoho.eu/api/myAdminAccount/json/myApp/form/myForm/record/update/"
    v_EndPoint = v_EndPoint + "?criteria=" + v_Criteria + "&FieldToUpdate=ValueToUpdateWith";
    m_Params = Map();
    m_Params.put("authtoken",v_AccessToken);
    m_Params.put("scope","creatorapi")
    response = invokeurl
    [
        url :v_EndPoint
        type :POST
        parameters:m_Params.toString()
        connection:"myzohocreatorconnection"
    ];
    1.  v_AccessToken = "123abc456def789abc123def456abc"
    2.  v_Criteria = "ID=1234567890123456789"
    3.  v_EndPoint = "https://creator.zoho.eu/api/myAdminAccount/json/myApp/form/myForm/record/update/" 
    4.  v_EndPoint = v_EndPoint + "?criteria=" + v_Criteria + "&FieldToUpdate=ValueToUpdateWith"
    5.  m_Params = Map()
    6.  m_Params.put("authtoken",v_AccessToken)
    7.  m_Params.put("scope","creatorapi") 
    8.  response = invokeUrl 
    9.  [ 
    10.      url :v_EndPoint 
    11.      type :POST 
    12.      parameters:m_Params.toString() 
    13.      connection:"myzohocreatorconnection" 
    14.  ]
  4. Successful Response:
    copyraw
    {
      "formname": [
        "myForm",
        {
          "operation": [
            "update",
            {
              "criteria": "ID=1234567890123456789",
              "newvalues": [
                {
                  "FieldToUpdate": "ValueToUpdateWith"
                }
              ],
              "status": "Success"
            }
          ]
        }
      ]
    }
    1.  { 
    2.    "formname": [ 
    3.      "myForm", 
    4.      { 
    5.        "operation": [ 
    6.          "update", 
    7.          { 
    8.            "criteria": "ID=1234567890123456789", 
    9.            "newvalues": [ 
    10.              { 
    11.                "FieldToUpdate": "ValueToUpdateWith" 
    12.              } 
    13.            ], 
    14.            "status": "Success" 
    15.          } 
    16.        ] 
    17.      } 
    18.    ] 
    19.  } 

Encountered Issues:
  • #2945 INVALID TICKET: Ensure you are using creator.zoho.com or creator.zoho.eu for your endpoints as appropriate.
  • #2945 MORE_THAN_MAX_OCCURRENCE: Ensure your params are submitted as a JSON string (not a JSON list).
  • Update Success: Not updating creator: This is a permissions issue. Ensure the owner or SuperAdmin of creator is the one creating the connection link. The JSON response is that the update was successful but the Creator tables do not update...
  • ZohoCreator/creatorapi option not available to enable: resolved by deleting any existing ones, refreshing the page and trying again.
Category: Zoho :: Article: 668

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Related Articles

Joes Revolver Map

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.