Redirect in Custom Push/Get With Action Button

Last updated Feb 20 2018
When you use the SF Action button to create a custom Push or Get you don't have to submit the form because the action button acts as trigger.
If you wish to have your form redirect to another URL after this custom Get or Push - you can easily add this functionality in your Action button configuration.

Example
Following is an example to show you how to redirect your form after a custom Get:
In this example the filler will enter an account name and press on the custom button, and based on the account he entered the phone umber will be drawn and a URL will be stored in the form's hidden field - all this populated from the SF 'Account' object.  After this, the form will redirect to a different url (in this case another FormTitan published form) based on the URL in the hidden field and params will also be added at the end of  the url to pre-fill some fields in it.

Before starting - create test data
*-  In order to follow this example you will need to create some test data:
A- In your FormTitan account  - Create a new blank form - call it "test redirect"  - we will redirect our main form to it.
- drag a textbox in it. Change its label text to "Account" and check what its Field id is. (When it is selected on canvas you will see its id inside the "Settings" tab)
- Press on the "Publish" icon in the top toolbar and copy the form URL. (so we can redirect to it)
B- In your Salesforce account - set up a test record in the  "Account" object - create a new account, Give it a name, a phone number and insert the URL from the previous bullet in the Account Description field.


Create your main form with a custom Get
1- Create a new blank form.
2- In the form builder - Give your form a name: custom get ("Properties" panel > Form > Settings > General > Basic > General)
3- Drag the following elements on to the canvas:
- Textbox - for account field (From "Element" panel > "Basic" category > "Input" sub category > Textbox)
- Textbox - for phone field (From "Element" panel > "Basic" category > "Input" sub category > Textbox)
- hidden field - to store a URL (From "Element" panel > "Widgets" category > Hidden)


4- Select the first textbox and change its label text to: Account
Select the second textbox and change its label text to: Phone
Select the hidden field and change its name to: id_url


5- Delete the default submit button, which is already on canvas.
6-  Create a Salesforce Get integration:
- Go to "Properties panel" > "Form" tab > "Salesforce Integration" > Get from Salesforce
- Push on the "Map fields" button
- Authenticate with Salesforce


- Choose an object: Account and turn on the "Use in custom button" checkbox


- Set a condition: Account name equals account


- Map the fields:
Phone --> Account Phone
id_url --> Account Description 

 7-

Drag a SF Action button (From "Element" panel > "Salesforce" category > Button)
Once on canvas, the configuration window will open and you will need to map the custom button to your Get action
- Open the "process push"  dropdown and chose the "Account (Get)" option.
- Press on the "add" button and the action will be added in the grid at the top.


- Turn on the "Redirect after finish" checkbox - this will open a few fields you will need to set:


- Url: Choose the form field you would like to draw the URL from (in this case we will take the URL from the hidden field, which is mapped to the account description field in Salesforce).
- Open in: you will be able choose between Self and Parent. 
- Set parameters - you can choose parameters that will be added to the URL in order to pre-fill fields in the form. In this case we will turn on the 
Press on the "Set parameters" button and
Turn on the "Use" checkbox in the rows of the fields you would like to prefill. 
Enter a Param name - in this case we will use the id of the field you want to pre-fill in the form you redirected to: fld2

8-

Select the button and change the text on the button to: Get Now

9-

Now test your form:
- Publish it as URL and test it
- Enter the name of the test account in Salesforce
- you will now see the phone number populated based on it
- the form will redirect automatically to the test form you created and you will see that the first textbox was prefilled.
- If you look closely at the URL you will see it is the same one you inserted in your Salesforce account, and the params are added at the end of it.
   
 
 
CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.