2

Background:

I built a new Salesforce application in my Enterprise Org's (Developer Pro) sandbox just to get a minimal viable project up and running quickly and demo this to some users. There's a bunch of custom objects, a couple of Apex triggers, a handful of Apex classes and an inbound REST endpoint and some other odds and sods.

Obviously at some point I needed to extract this app and get it under source control in a Salesforce project and begin using SFDX. So I followed the steps as described in:

Migrating Existing Projects to Salesforce DX

This all went swimmingly well and I am able to push the app to a scratch org just fine.

The Problem:

After opening the app in my scratch org it seems I need to create a permission set so I can access my app, see its tabs and add/update records. It seems that app permission sets aren't included in the metadata retrieved using sfdx force:mdapi:retrieve.

To overcome this I followed the steps in section 11 of Migrating Existing Projects to Salesforce DX which is fine. Then I got to the "Object Settings" permissions bit as seen here (I've greyed out some stuff that's sensitive):

enter image description here

Each one of my custom objects has between 30-40 fields, do I really need to tick every "Read Access" and "Edit Access" checkbox individually?

Is there a better and more efficient way to do this?

  • 1
    The SFSE Q&A you link regarding not being able to extract your perm set from the Sandbox isn't actually relevant. That Q&A addresses using force:source:pull against any non-scratch (ie, not "source-tracked") org. You can extract a permset from your Sandbox by either including it in the manifest specified (explicitly or implictly) with force:mdapi:retrieve or with force:source:retrieve. – Thomas Taylor Apr 22 '19 at 15:58
  • @ThomasTaylor - not had time to revisit this in depth. However I did give it a quick shot and see that this doesn't seem to return individual field permissions on my custom objects. – Kev Apr 24 '19 at 20:45
  • Which command did you use? Are the custom objects in your sfdx project? – Thomas Taylor Apr 24 '19 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.