All docs pages (49)

XML Builder

Fill in a form to build Salesforce metadata XML for 35 types, download it or a package.xml and .zip, and validate or deploy the bundle to your org.

Updated 2026-11-09

XML Builder writes Salesforce metadata XML from a form, so you don't have to type the XML by hand. You can copy or download the file, collect several components into a bundle with a package.xml, and validate or deploy that bundle to the org you are connected to. Open Metadata → XML Builder. The page is titled Metadata XML Builder.

How to use it

  1. Under Select Metadata Type, pick a type. There are 35, including Custom Field, Custom Object, Permission Set, Validation Rule, Custom Label, Record Type, Named Credential, Workflow Rule and Profile.
  2. For types that belong to an object (fields, validation rules, record types, list views, workflow items and others), pick the object first.
  3. To start from something that already exists, use the loader above the form (for example Load Existing Field) and pick an item. Its values fill the form. Use the New button next to it (for example New Field) to start blank.
  4. Fill in the form. The XML preview on the right updates as you type, along with the file's SFDX path.
  5. Use the toolbar: Copy XML, Download, Copy Path (the SFDX file path), Import (paste existing XML to load it into the form) or Reset (asks you to confirm). Copy, download and add-to-bundle stay disabled while a required field is missing or a value is invalid.
  6. To build a deployment, click Add to bundle. Repeat for other components. The bundle bar at the bottom shows Bundle (N) and lets you download package.xml or Download .zip, or click Deploy to org.

When the extension can read your org's metadata types, the type page also says how many types your org exposes, and lists Other types in your org. Picking one of those opens a read-only view: choose a component to see its XML, then Copy or Download it.

Deploying

Deploy to org opens a dialog for the connected org:

  • Validate only (check-only — nothing is saved) is ticked by default. With it ticked, the button says Validate; untick it and the button says Deploy.
  • Test level: No tests (sandbox only), Run local tests or Run all tests in org.

Nothing is sent until you click Validate or Deploy. The dialog then shows progress, the number of components and tests, and lists Component failures and Test failures. You can close it with Close (deploy continues); the deployment keeps running in Salesforce. A Deployment status in Setup link opens Setup's Deployment Status page.

What it reads and writes

Reads, through your current session:

  • The Metadata API's describe, to list the metadata types your org exposes.
  • Existing components for the loaders, mostly through Tooling API queries (for example the Metadata field of CustomField) and object describes.

Writes: only when you click Deploy with Validate only unticked. The bundle is sent as a .zip to the Metadata API (deployRequest) with "roll back on error" turned on, so Salesforce saves either all components or none. A validation runs the same checks without saving. Copying, downloading and building the bundle don't touch the org.

Limits

  • In version 1.1.13, if the deploy's status can't be read after Salesforce has accepted it (for example a network blip, or the 10-minute polling limit), the dialog says Deploy failed to start even though the deploy may be running or finished. Check Deployment Status in Setup before you deploy again. In the release after 1.1.13 the dialog says the deploy started and its status couldn't be read.
  • Only the 35 listed types have a form. Other types can only be viewed and copied as XML, not edited or added to a bundle.
  • Many loaders and the read-only viewer list at most 200 existing items, and the viewer doesn't say when it hit that number.
  • The bundle is kept in the page's memory. Copy or download what you need before you close the tab.
  • The dialog checks the deployment every 2.5 seconds for up to about 10 minutes. After that it tells you to check Deployment Status in Setup.
  • The API v box on the bundle bar sets the API version for package.xml and the deploy. It is the same API version setting the rest of the extension uses.
  • Matching Rule XML can be built and downloaded, but Add to bundle stays disabled for it in this version.