[SalesForce] SFDX: where can set Field-level security and accessibility

Every time I push my app to a new scratch org, I'm having to go into each field of each custom object to set the field-level security and accessibility (except for the required fields). I didn't have to do this before.

Has something changed with Salesforce security/accessibility? Could I have inadvertently added something to the .forceignore file that is causing this?

I assume those settings must be somewhere in the metadata in my SFDX project, but I can't find it. I don't see it in the objects/[myobject]/fields/[field].field-meta.xml, or in the objects/[myobject]/[myobject.object-meta.xml.

Best Answer

The issue is because you are not pushing the profiles along with the other metadata. The FLS is present in the profiles . I usually recommend to move away from profiles and go with permission sets as those are more flexible .

Related Topic