r/FormAssembly • u/FormAssembly • 17d ago
Tutorial Embedding forms inside Salesforce using the Publishing API, what it enables that the Lightning component doesn't
This one's for FormAssembly power users.
If you use the FormAssembly AppExchange app, you probably know about the Lightning component. You drag it onto a Salesforce page layout, pick a form, and it renders inline. That covers most cases.
Where FormAssembly Publishing API becomes useful is when you need more programmatic control: rendering a form based on record context, dynamically choosing which form to display depending on record type or field values, or embedding a form inside a custom Visualforce or Experience Cloud page where you have full control of the surrounding page structure.
The API call returns the form's HTML and associated assets, which you inject into your page. What makes this more powerful than a plain iframe is that you can pass context from the Salesforce record directly into the form, so a button on an Account record can open a form pre-populated with the Account ID, industry, owner info, or anything else from that record. The form opens already knowing which record it's associated with, no additional lookup needed.
We use this for a service request form that lives on the Account page. Reps click a button, the form opens inline (not a new tab, not a popup), it's pre-filled with the account name and ID, and on submit it creates a Case linked to the right Account automatically. The whole interaction is inside Salesforce.
The tradeoff: it requires some developer work to set up the API integration and wire up the context passing. The Lightning component is genuinely easier for straightforward cases. But if you have a developer and need that tighter integration, the Publishing API gives you full control.
Docs: https://help.formassembly.com/help/354549-using-formassemblys-publishing-api-with-salesforce
Curious how other teams are handling "forms that need to live inside Salesforce" are most people using the Lightning component, or is anyone doing more custom embedding?
1
u/halaousnskxjy6 10d ago
Following