Editing Records via Record-ID
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.
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.
|<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 -
- 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.
You may follow the below given steps to try the above given Record-edit URL formats using the Sales Commission sample application.
- Create a record using the Form Commissions.
- 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).
- Replace the <record_ID> in the below URLs with your record's ID.
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");
|<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 -
where, the <key> is the key that is generated once a Report is published (as mentioned here).