RV Entry - URL Addressable

Last published at: 2024-05-16 13:53:36 UTC
Delete

The RV Entry Lightning Component can be accessed via a URL that can be built up to configure the form. This lets you create a link that opens an entry page for a specific object and record type, and pre-populate values. In addition, a success or cancel URL can be set.

Base Path 

To open the RV Entry Lightning Component, the URL should contain the base path, which is placed after the Salesforce domain.
In addition, configure the form by adding one or more parameters. The c__objectApiName parameter is required to indicate the object. Other parameters are optional.

The base path for opening the RV Entry component is:

/lightning/cmp/recordval__recordFormByUrl?

Parameters

Build your link by placing the required c__objectApiName parameter after the base path's question mark. If you want to add additional parameters, separate the parameters with the "&" character. 

For example: c__objectApiName=Account&c__recordId=00Q090000011OGpEAM

When using IDs, make sure to use 18-character IDs.

Parameter Description Example
c__objectApiName The Object API Name. This parameter is required c__objectApiName=Account
c__recordId Record ID. Use this parameter if you want to edit a specific record. Use an 18-character ID, or add the CASESAFEID() method to guarantee an 18-character ID.
c__recordId=00Q090000011OGpEAM
c__recordTypeId Record Type ID. Use this parameter if you want to create a record with a certain record type. Use an 18-character ID, or add the CASESAFEID() method to guarantee an 18-character ID. c__recordTypeId=012090000008VO0AAM
c__defaultValues To pre-populate field values in the form, use a URL encoded JSON string as value.  For example, see below. 
c__successUrl Use this parameter to override the URL target after a record is successfully saved.  c__successUrl=https://www.recordvalidation.com
c__cancelUrl Use this parameter to override the URL target after a user clicks the cancel button.  c__cancelUrl=https://www.recordvalidation.com

Setting default values 

To pre-populate values in the RV Entry form, use the c__defaultValues parameter. The value for this parameter should be a URL encoded JSON string. There are many free online tools that can help you with encoding JSON.

Input:

{
 "Field_API_Name" : "Value",                        // For example - "Email" : "ruben@plauti.com" //
 "Field_API_Name2" : "Value"
}

Output:

    %20%7B%0A%20%22Field_API_Name%22%20%3A%20%22Value%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%22Field_API_Name2%22%20%3A%20%22Value%22%0A%7D
/lightning/cmp/recordval__recordFormByUrl?c__objectApiName=Lead&c__defaultValues=%20%7B%0A%20%22Field_API_Name%22%20%3A%20%22Value%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%22Field_API_Name2%22%20%3A%20%22Value%22%0A%7D

Troubleshooting

Any IDs used should have the 18-character format.
If you get an RVENTRY_ERROR_LAYOUT_INCOMPLETE (Missing properties in the page layout for {0} object.) error when opening the RV Entry page via a generated URL, use the CASESAFEID() method to convert the 15-character length ID to an 18-character length version.