Choose where you’d like to start

Update Record in Zoho FSM

Description

You can update a record of a module using the zoho.fsm.updateRecord() Deluge task.

This task is based on Zoho FSM API -> <Module> APIs -> Edit <ModuleName>

Syntax

<variable> = zoho.fsm.updateRecord(<module_name>, <record_ID>, <record_details>, <optional_data_map>, <connection>);

where:

Params Data typeDescription
<variable> KEY-VALUEis the response returned by Zoho FSM.
<module_Name> TEXT

is the API name of the Zoho FSM module where the records will be updated.

The API names of the modules are: 
Assets, Companies, Contacts, Estimates, Requests,  Scheduled_Maintenances, Service_And_Parts, Service_Appointments, Time_Off, Work_Orders

<record_Id>NUMBER

is the unique ID of the record you want to retrieve.

Note: Learn how to fetch the ID of a record after creating or fetching it.

<record_value>KEY-VALUE

is the input map details of the record that needs to be inserted into the module.

Note: To learn about the mandatory fields, click here and navigate to <Module> APIs -> Edit <ModuleName>

 

<optional_data_map>

(optional)

KEY-VALUE

is a parameter to pass any additional values. If you want to ignore this parameter, supply an empty map.

Note: To learn about the optional parameters, click here and navigate to <Module> APIs -> Edit <ModuleName>

 

<connection>

(optional)

TEXT

is the name of the connection created for Zoho FSM.

Note: Add relevant scopes as mentioned in Zoho FSM API -> <Module> -> Edit <ModuleName>.

Example

The following script updates the record with ID - 23033XXXXXXXXXXXXXX of the Zoho FSM module - Requests.

emptyMap = Map(); 
 
newRecordInfo = Map(); 
newRecordInfo.put("Priority", "High"); 
 
response = zoho.fsm.updateRecord("Requests", 1439XXXXXXXXXXXX, newRecordInfo, emptyMap, "fsm_connection"); 

where:

newRecordInfo
is the KEY-VALUE input with details of the record that will be updated in the module.
response
is the KEY-VALUE response returned by Zoho FSM.
"Requests"
is the TEXT that represents the API name of the Zoho FSM module where the record will be updated.
23033XXXXXXXXXXXXXX
is the NUMBER that represents the ID of the record that will be updated.
"fsm_connection"
is the TEXT that represents the link name of the connection created for Zoho FSM.

Response Format

The following is a success response when a record is updated in Zoho FSM.

{
  "data": [
    {
      "code": "SUCCESS",
      "details": {
        "Modified_Time": "2022-05-16T00:48:58-07:00",
        "Modified_By": {
          "name": "Mary Cooper",
          "id": "1439000000161001"
        },
        "Created_Time": "2022-05-12T03:42:38-07:00",
        "id": "1439000000185139",
        "Created_By": {
          "name": "Mary Cooper",
          "id": "1439000000161001"
        }
      },
      "message": "record updated",
      "status": "success"
    }
  ]
}

Related Links

Get Started Now

Execute