Extension pointers - Simple yet significant pointers #13: On change of field value for CRM variables

Extension pointers - Simple yet significant pointers #13: On change of field value for CRM variables



CRM variables provide global access to a variable across an entire extension. They also help in the storage of user-specific data provided by the user at the time of installation, which can later be fetched to perform data functionalities. 

Additionally, the Zoho CRM Developer platform lets you perform logicaI functions whenever the value of a CRM variable changes. If you want to perform a function when the value of your CRM variable changes, you can use the CRM variable's field value on change script to achieve your desired functionality. 

How to perform a function on field value change of CRM variable 
  • Choose Custom Properties from the left panel of the Zoho Developer console, under Build. Click Write Script associated and available next to your CRM variable. 

  • Write the code logic in the custom function Deluge script editor and click Save. You can fetch the old and new value of CRM variable and perform the functionality using that in the function. 
➤ The syntax for getting the old value of the custom variable is:

<oldvalue> = input.variableMap.get("oldvalue");
 
➤ The syntax for getting the new value of the custom variable is:

<newvalue> = input.variableMap.get("newvalue");
 
  • When the extension is published and installed in the Zoho CRM account, whenever the value of the CRM variable changes, the script of field value change is triggered and its functionality occurs.
 
SEE ALSO