Pass Parameters in the URL (13 min)
Completion requirements
01 Getting Started
This tutorial covers how to pass parameters through the URL including:
- Encrypting Salesforce record IDs
- Use cases.
02 Passing Parameters
Parameters can be used to prepopulate forms, for example, if the account ID equals a particular value, a Salesforce get will run to populate the form with data saved in Salesforce.
The following was configured:
1. A static variable with the name account_id.
2. A Salesforce get was created.
Object Settings tab configuration:
Conditions tab configuration:
The mapping configuration matches the form in the Titan project:
An every-time page action was configured to run the created Salesforce get:
Save and preview the project. When passing a Salesforce Account ID through the URL, the form is automatically populated with the saved Salesforce data.
To pass a parameter through your URL, add &variablename=.
An issue with passing parameters in this way is the Account ID is shown in the URL, this data should be protected.
The following was configured:
1. A static variable with the name account_id.
2. A Salesforce get was created.
Object Settings tab configuration:
Conditions tab configuration:
The mapping configuration matches the form in the Titan project:
An every-time page action was configured to run the created Salesforce get:
Save and preview the project. When passing a Salesforce Account ID through the URL, the form is automatically populated with the saved Salesforce data.
To pass a parameter through your URL, add &variablename=.
An issue with passing parameters in this way is the Account ID is shown in the URL, this data should be protected.
03 Encrypt Variables
You can encrypt the Account ID. Before completing these steps, ensure you have installed the Titan package for Salesforce.
In your Account Object, create an Encrypted Text field and ensure the field can contain at least 150 characters to ensure the whole account id can be contained in the field.
Create an Autotrigger and configure the start as follows:
A new action was added to the trigger flow with the following configuration. Note that the field API must be retrieved from the custom object.
Your flow should now look like this:
Save and Activate your flow. When you update one of your accounts in Salesforce or add a new account, an encrypted Account ID will be populated. You can safely pass this through the URL as this information is encrypted.
Now that we have configured encryption for the Account ID, we will need to update the conditions of the Salesforce get. Note: If you do not see your custom Salesforce object in the dropdown, ensure you refresh your metadata.
Update your variable name to match the new functionality.
Now you can safely pass the encrypted ID through the URL without displaying sensitive information. This can also be done for your Power Tables. You can allow your users to update their account information even when using an encrypted Account ID.
In your Account Object, create an Encrypted Text field and ensure the field can contain at least 150 characters to ensure the whole account id can be contained in the field.
Create an Autotrigger and configure the start as follows:
A new action was added to the trigger flow with the following configuration. Note that the field API must be retrieved from the custom object.
Your flow should now look like this:
Save and Activate your flow. When you update one of your accounts in Salesforce or add a new account, an encrypted Account ID will be populated. You can safely pass this through the URL as this information is encrypted.
Now that we have configured encryption for the Account ID, we will need to update the conditions of the Salesforce get. Note: If you do not see your custom Salesforce object in the dropdown, ensure you refresh your metadata.
Update your variable name to match the new functionality.
Now you can safely pass the encrypted ID through the URL without displaying sensitive information. This can also be done for your Power Tables. You can allow your users to update their account information even when using an encrypted Account ID.