Creator Help

Editing Records via Record ID

Overview

Zoho Creator generates a unique ID (unique across your account) for every record that is added to the database. The ID can be displayed in your view by selecting the "ID" field from the "Column Properties" of the Report Settings, in Edit mode. The Record-Edit feature supports editing individual records via its Record ID, by displaying the form with the record details. This makes it easy for users to edit records without having to display the report, navigate to the desired record and then requesting to Edit it. The Record-Edit feature is generally used in the following scenarios:

  • When only a single record needs to be edited in a report that is shared but hidden.
  • To open a Form in a new tab with pre-populated data without having to traverse to the report and then edit the record.

Syntax

The URL to view and edit individual record using its record ID is given below. This will display the zoho creator form in edit mode.

http://creator.zoho.com/<userName>/<applinkname>/#Form:<formlinkname>?recLinkID=<recordID>&viewLinkName=<viewlinkname>

where ,

<userName> is the application owner name
<applinkname> is the application name
<formlinkname> is the name of the form in which the record exists.
<viewlinkname> is the name of the report.
<recordID> is the ID of the particular record to be edited (field name ID). The variable record ID (ID) is a default field in Zoho Creator that is automatically inserted for every record.
zc_NextUrl - optional parameter that specifies the url to which the user should be redirected to on success. Just append this parameter to the 'edit - record url' as /&zc_NextUrl=http://mail.zoho.com"

Example

The following URL will open the form Commissions with the record details of record id 89597000010683429 as shown in the screenshot below.

https://creator.zoho.com/sampleapps/sales-commissions/#Form:Commissions?recLinkID=89597000010683429&viewLinkName=Commissions_View

Alternatively, you can also use the default functionality of Zoho Creator to view and edit individual record using its record ID. The following url will display the form alone without displaying top header and other application components.

http://creator.zoho.com/<userName>/<applinkname>/<formlinkname>/record-edit/<viewlinkname>/<recordID>

The URL mentioned below will open the form Commissions with the record details of record id 89597000010683429 without displaying top header and other application components as shown in the screen-shot below.

https://creator.zoho.com/sampleapps/sales-commissions/Commissions/record-edit/Commissions_View/89597000010683429

Invoking the URL from Deluge Script

From Deluge script, you can programatically invoke a form in Edit mode using the openurl deluge task. For example,

openurl("http://creator.zoho.com/"+zoho.adminuser+"/"+zoho.appname+"/add_contact/record-edit/contact_view/"
+ input.ID + "/","same window");

where,

zoho.adminuser - is a zoho variable that returns the username of the application owner.
zoho.appname - is a zoho variable that returns the application name
input.ID - fetches the ID of the current record .

To fetch the ID of a specific record in the database,

//fetch the record with any criteria
rec = test_form[<any criteria>]
//Now the rec.ID will return the record id(ID)

Note:

  • If the user is not the App Admin, the report has to be shared and permission to edit record has to be provided to the user. If accessed through #, the form also should be shared.
  • To edit a record that would normally not be present in a report with a specified Criteria or hidden fields, the master report must be shared and edit permission provided.
  • To retain the ID convert the ID to a HexaDecimal String. For this, you can create a formula field in the Form and write the formula to retain the ID value as
    input.ID.toHex()

Top