Display a form only within your salesforce org

Last updated Feb 01 2019

When building a FormTitan form you have 3 options of form visibility.
1- Public form -  this is the default state, where anyone can access it via URL.
2- Private form - this state requires a collaborator access, login via Titan.
3- SF Token -  this option allows access to the form only when it is opened from your Salesforce org.
This post is about the third option: access within Salesforce only.


Where do I start?
Before you start make sure you have the FormTitan Latest package installed in your org.
First on your form go to Form Settings => Limits => check the SF Token.


Doing this will block the form to the outside world.


To enable the form within salesforce follow these steps.
1. create a controller extension like so:


*This will allow you to use the Form_Builder.FormTitanUtils.getAuth() from VisualForce pages with a standard Ctl, and with a lightning
components.
** The getAuth() method returns an encrypted string that allows formtitan to identify the user, the auth token is kept alive for 60 minutes, every time you access the page, a new token is generated.


2. Create a visual force page with a standard controller of your choice, and with the Ctl extension we created (you will need to change the url in the iframe to your form url, and if you need to pass params to the form you will need to send it to you hidden ids) make sure you pass the "auth" token that we receive from the extension Ctl like so:


3. You can then use this page in a number of ways
.

A. In your object layout: Setup=> *Objects => your object => Page layout => visualforce pages, and drag the page to the layout.(this will work for lightning and classic)

B. Button for classic: Setup=> *Objects => your object => buttons and links => new button
Save and add to your layout.


C. Action for lightning Setup=> *Objects => your object => buttons and links => new Action.
Save and add to your layout.


D. With lightning components please follow these steps:

i. Developer Console => New lightning Component


ii. You can use the below example code for the component:
Cmp:

E. Now you can use this component in an Action, or a lightning page and more.

* If you are building your action from lightning go to Object Manager in this step.


 Watch the videos:
Classic version


Lightning version


 

CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.