Editing Records via Record-ID

Overview

Zoho Creator generates a unique ID (unique across your account) for every record that is added through a Regular Form. To view the ID of a record in your Report, you need to drag-and-drop the ID Field in the Report Settings -> Column Properties (as mentioned here).

The Record-Edit feature supports editing individual records using their (unique) record-IDs. This makes it easy for users to edit a specific record, else they would have to access the Report, select the the desired record and then edit it. This feature may be used in the following scenarios -

  • To open the Form with pre-populated data of the desired record, so as to display only the record that needs to be edited.
  • When only a single record needs to be edited in a Report that is shared, but hidden.

Syntax

The URL to view and edit a record using its record-ID is given below. This URL will display your Zoho Creator Application's Form (through which the respective record was entered), with the record's details (data) pre-populated.

https://app.zohocreator.com/<app_owner_name>/<app_link_name>/#Form:<form_link_name>?recLinkID=<record_ID>&viewLinkName=<report_link_name>&zc_NextUrl=<next_URL>

where,

<app_owner_name> is the Zoho user-name of the application's owner
<app_link_name> is the Link Name of the Zoho Creator application
<form_link_name> is the Link Name of the Form (through which the record was added)
<record_ID> is the ID of the desired record
<report_link_name>  is the Link Name of the said Form's corresponding Report (which the user has access to)
zc_NextUrl is an optional parameter; it specifies the URL to which the user should be redirected once the record has been successfully edited
<next_url> is the value passed to the zc_NextUrl parameter; it specifies the URL to which the User should be navigated after successfully editing the record 

Alternatively, you can also use the below URL format -

https://app.zohocreator.com/<app_owner_name>/<app_link_name>/<form_link_name>/record-edit/<report_link_name>/<record_ID>
Note: For a user (other than the application's owner) to edit a record using these URLs,
  • the respective Form should be shared with the user, and,
  • the respective Report should be shared with appropriate permissions (notably, the permission to Edit records).

Refer this page know about sharing your Zoho Creator application or its components with your users.

Example

You may follow the below given steps to try the above given Record-edit URL formats using the Sales Commission sample application.

  1. Create a record using the Form Commissions.
  2. Navigate to the Report Commissions View and select the record you created. Note the ID of your record (as shown in the below given screenshot).

  3. Replace the <record_ID> in the below URLs with your record's ID.​
    • https://app.zohocreator.com/sampleapps/sales-commissions/#Form:Commissions?recLinkID=<record_ID>&viewLinkName=Commissions_View&zc_NextUrl=https://www.google.com
    • https://app.zohocreator.com/sampleapps/sales-commissions/Commissions/record-edit/Commissions_View/<record_ID>

Invoking the URL from Deluge script

You can facilitate editing of a particular record by invoking the OpenURL Deluge task as well. This may be useful if you require the record-edit view to open when certain actions are performed (on button-click, on addition of a record, etc.). The syntax will be as given below.

openurl("https://app.zohocreator.com/" + <zoho.adminuser> + "/" + <zoho.appname> + "/<form_link_name>/record-edit/<report_link_name>/"
+ <record_ID> + "/" , "same window");

where,

<zoho.adminuser>  is a Zoho variable that returns the Application owner's user-name
<zoho.appname>  is a Zoho variable that returns the Application's Link Name
<record_ID> the ID of the record to be edited

You would need to pass the record-ID parameter to the Open-URL task, for which, you may use the Fetch Record Task and fetch the ID of the respective record.

Note: To edit records of a published Report, the following URL format needs to be used -

https://creator.zohopublic.com/<app_owner_name>/<app_link_name>/<form_link_name>/record-edit/<report_link_name>/<record_ID>/<key>

where, the <key> is the key that is generated once a Report is published (as mentioned here).