0

I'm having issue to remove access for objects using ant/eclipse. Currently some profiles have access to Opportunity object (Read/Edit/Create) and I want to remove those access. However, after I modify the profiles in SF (uncheck the relevant checkboxes in the profile settings) and retrieving the profiles using eclipse, they have no references to the Opportunity object, therefore deploying it using any doesn't make any change to the object permission for this profiles.

As usual, I can do manual work and write in the profile xml file the object with false access (e.g false ), but I prefer it will be done with tools. Removing object access, seems to me very basic functionality, and it'll be very weird if it cannot be done with eclispe/ant.

  • Problem is in way how ant works with profiles and permission sets. Permissions for those are retrieved for objects, which are part in package.xml. So, to fetch permissions for Opportunity, you need to have Opportunity object in your package.xml – kurunve Apr 18 '17 at 15:36
  • I have Opportunity object in package.xml, it isn't the issue. Issue is when profile doesn't have access to Opportunity then instead marking this objectPermission with false, it doesn't mark it at all – Liron C Apr 18 '17 at 17:33
0

Unfortunately, you cannot retrieve a profile's object setting set to "No Access" and overwrite the same setting in the target org. The object is simply skipped in the profile's XML file...

More of an issue is that Salesforce does set some defaults CRUD on some objects in the target when creating the object you are deploying. This behaviour does not happen with permission sets where the default CRUD is "No Access" if not specified - so all good.

It's been a problem in my deployments and I tend to deploy the profiles in my packages then align them manually.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.