Form pre-population

What it does

Pre population fills a form's fields before the user starts, from two sources: the Salesforce record the form is bound to, and values passed in the URL. This saves the user re entering data you already hold and lets you seed values from a link.

Pre population runs on a fresh load. When a draft is being resumed instead, the saved draft answers are used rather than re running pre population. See Save as draft.

From a record

When the form is opened with a record id, that record is the context record. The form reads the fields it needs and fills the matching questions. It also walks the form's structure:

Read only text with merge tags is resolved against the relevant record at this stage too. See Merge tags and templates.

A question can opt out of pre population if you do not want it defaulted.

From URL parameters

Any query parameter on the form link, beyond the known ones like form id and record id, is treated as a field prefill value. A parameter is matched against a question by its name or its mapped field, case insensitively. Both plain query string links and hash style links are supported, so prefill works even when the form is embedded in an iframe.

URL prefill does not depend on a record id. A form opened with no record still fills every question that matches a query parameter.

Precedence

When both sources provide a value for the same field, the URL parameter wins. This lets a link override what is on the record, for example to pre select a value regardless of the stored data.

Types are handled for you

Values are converted to the right shape as they are filled: dates and times to the correct local format, multi value fields split into their parts, and so on. You provide the raw value, whether from the record or the URL, and the form renders it correctly.

Tips