First, you will want to ensure that your Remote Site Settings are configured properly
For the purpose of this article, we've already built our form. So now, let's publish it, and navigate to our publishing options.
From here, simply enable Dynamic Prefill, and you will be presented with some new options
Our form has a contact object, and provides us with an automatic set up for Dynamic Prefill:
**NOTE** This option only is presented if you have a Contact or User object in your form.
Once it has been set up, hit Save Prefill.
With Prefill in place, prefilling the details from the contact record, you can now log in to your community as a user, and see the details from their related contact record
If you do NOT want to prefill based on the logged in User context, you can specify matching criteria on your primary object, and display records that are related to this object within the community
In the above example, any Contact record that is related to an account named "Test2000" will be prefilled here.
Get the community URL where you are going to add lightning component.
- Go to Setup> [Quick find] All Communities
- You will see list of communities in your org. See screenshot below.
- Copy the link text listed under URL section of your community. (e.g. )
White-list the URL so that Formstack can make REST API calls through that URL.
- Go to Setup> [Quick find] Remote Site Settings
- Just confirm if the community domain is listed here.
- If not, then click on New and do the following:
- Remote Site Name: i.e. FormstackUrls_CommunitySite
- Remote Site URL : <Community Site URL' Domain> i.e. https://yourcommunity.na59.force.com
- Description: Community site base url for Formstack app to make REST API accessible to community prefill feature
- If your form is Admin Context then you also need to add login.salesforce.com or test.salesforce.com
- If you are using custom domain then you need to consider that domain for whitelisting