This lesson will cover the following topics:

01 Getting Started

This tutorial covers how to pass parameters through the URL, including:
  • Encrypting Salesforce record IDs
  • Use cases.
Note: Ensure Debug Mode is enabled so you can see how the parameter is being passed.

02 Passing Parameters

Parameters can be used to prepopulate forms; for example, if the account ID equals a particular value, a Salesforce Get will populate the form with data saved in Salesforce.

The following was configured:
1. A static variable with the name account_id.

custom variables > static

2. A Salesforce get was created.
Object Settings tab configuration:

map salesforce object > object settings tab

Conditions tab configuration:

map salesforce fields > conditions tab

The mapping configuration matches the form in the Titan project:

Map salesforce fields > mapping tab
 
An every-time page action was configured to run the created Salesforce Get:

add node / salesforce action

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=

example showing how the account id is passed in the URL

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.

Create an Encrypted Text field in your Account Object and ensure it can contain at least 150 characters to accommodate the whole account ID.

encrypted account field
Create an Autotrigger and configure the start as follows:
configure start screen

The trigger flow now includes a new action with the following configuration: The field API must be retrieved from the custom object.

new action config

Your flow should now look like this:

flow example

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. As this information is encrypted, you can safely pass it through the URL.

encrypted account id

Now that we have configured encryption for the Account ID, we must update the Salesforce Get conditions. Note: If you do not
see your custom Salesforce object in the dropdown, and ensure you refresh your metadata.

map salesforce fields> conditions tab

Update your variable name to match the new functionality.

updated variable name

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 users to update their account information even using an encrypted Account ID.

04 Got Feedback?

Additional Resources