Update and Deploy Permissions

Update a permission set to ensure that the function we create can access data in our Salesforce org. A permission set is a collection of settings and permissions that give users and apps access to various tools and data in Salesforce.

When you connect your org to Salesforce Functions via the Functions Setup page, Salesforce creates a Functions permission set with minimal permissions. Update that permission set to give your function access to the Account object.

To update the Functions permission set, add the file force-app/main/default/permissionsets/Functions.permissionset-meta.xml, with contents:

These permissions allow a running function in a compute environment connected to your org to access the Account object.

Use project deploy start with the --ignore-conflicts flag to deploy your changes to the Functions permission set to your scratch org:

  • --ignore-conflicts Runs the deploy command even if conflicts exist.
  • --target-org A username or alias for the target org. Overrides the default target org.


In VS Code, from the Command Palette, choose SFDX: Push Source to Default Scratch Org.