View this page in the latest version of Appian. a!urlForRecord() Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page Function a!urlForRecord( recordType, targetLocation, identifier, view ) Returns the URL for one or more records in a site page or Tempo. Can also return the URL for a record list in Tempo. See also: Record Type Link Component Record Type Tutorial (Database) Parameters Keyword Type Description recordType RecordType A reference to a record type. Reference the record type using the recordType! domain or a constant that points to a record type. targetLocation Any Type The location where the record should open, which can be either a site page or Tempo. To reference a site page, use the following structure: site![site name].pages.[page web address identifier]. Valid values: TEMPO or a reference to a site page. This parameter is required. identifier Text One or more record identifiers. This is typically the primary key field. For record types with a composite primary key, provide values for all key fields. If the target location is a site page, at least one identifier is required. If the target location is "TEMPO" and no identifier is provided, the URL for the record list will be returned. view text The URL stub of the record view to open for the record. Default is "summary". Returns Text Array Usage considerations Required permissions The user executing the function must have at least Viewer permissions to the record type or the expression will fail and an error will occur. Links may be clicked by everyone; however, security settings determine what can be seen. If a user tries to open a URL without having at least Viewer permission to the record or record type in that URL, they will see an error. Using the recordType parameter You must reference a record type using the recordType! domain. For example, recordType!Customer. If the record type for the recordType value does not exist, the expression will fail and an error will occur. Using the identifier parameter The value you provide for the identifier parameter depends on the record type's data source: Database-backed: Use the primary key value from the source table. If the table uses a composite primary key, create a record map to pass the values for all fields that make up the key. For example: recordType!Part Supplier(partId: 4, supplierId: 45). Process-backed: Use the process instance ID. Service-backed: Use the value of the field configured as the primary key. If the identifier value is null or empty, the function returns the URL for the record list view of the recordType value record type. Using the targetLocation parameter Avoid opening links in Tempo unless your users are accustomed to using it. Adjust the targetLocation parameter so that it opens a site page that is predictable and familiar to your users. Examples These examples are designed to illustrate how to use the a!urlForRecord() function in the Expression Rule Interface. Record type and site object references are specific to each environment. If you copy and paste these examples into the Expression Rule interface, they will not evaluate in your Test Rules interface. Use them as a reference only. URL for a single record that opens in a specific site page 1 2 3 4 5 a!urlForRecord( recordType: recordType!Cases, identifier: 1, targetLocation: site!caseManagemt.cases ) Returns 1 "https://home.appiancloud.com/suite/sites/case-management/page/cases/records/item/lIBBmtkdu05df/view/summary" If the page is in a page group, the url includes the page group. 1 "https://home.appiancloud.com/suite/sites/case-management/group/cases/page/openCases/records/item/lIBBmtkdu05df/view/summary" URL for multiple records that open in a specific site page 1 2 3 4 5 a!urlForRecord( recordType: recordType!Cases, identifier: {1,2}, targetLocation: site!caseManagemt.openCases ) Returns 1 2 3 4 { "https://home.appiancloud.com/suite/sites/case-management/page/openCases/records/item/lIBBmtkdu05df/view/summary", "https://home.appiancloud.com/suite/sites/case-management/page/openCases/records/item/lIBBmtkdu05df/view/summary" } URL for a single record: Tempo 1 2 3 4 5 a!urlForRecord( recordType: recordType!Cases, identifier: 1, targetLocation: "TEMPO" ) Returns 1 "https://home.appiancloud.com/suite/tempo/records/item/lIBBmtkdu05df/view/summary" URL for a composite key record that opens in a specific site page 1 2 3 4 5 6 7 8 a!urlForRecord( recordType: recordType!Part Supplier, identifier: recordType!Part Supplier( partId: 4, supplierId: 45 ), targetLocation: site!supplyChain.partSuppliers ) URL with a NULL identifier 1 2 3 4 5 6 a!urlForRecord( recordType: recordType!Cases, identifier: null, targetLocation: "TEMPO" ) Returns 1 "https://home.appiancloud.com/suite/tempo/records/type/enV6dA/view/all" Feature compatibility The table below lists this function's compatibility with various features in Appian. Feature Compatibility Note Portals Partially compatible Can be used with Appian Portals if it is connected using an integration and web API. Offline Interfaces Partially compatible Can be used with offline interfaces if loaded at the top of the interface. Sync-Time Custom Record Fields Incompatible Real-Time Custom Record Fields Incompatible Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. Process Reports Incompatible Cannot be used to configure a process report. Process Events Partially compatible If autoscale is enabled, can be used to configure a supported process event node (such as a start event or timer event). Process Autoscaling Compatible Can be used in autoscaled processes. Event Consumer Filter Conditions Incompatible Cannot be used in filter conditions. Event Consumer Event Handlers Incompatible Cannot be used in event handler expressions. Old versions There are older versions of this function . You can identify older versions by looking at the name to see if there is a version suffix. If you are using an old version, be sure to refer to the corresponding documentation from the list below. Old Versions Reason for Update urlForRecord_23r4 You can now specify a site page to open your record when using both a!urlForRecord and a!recordLink. To use the latest version of the function, replace the function with a version suffix with a new function reference. To learn more about how Appian handles this kind of versioning, see the Function and Component Versions page. Feedback Was this page helpful? SHARE FEEDBACK Loading...