You need to sign in to do that
Don't have an account?

Metadata setObjectPermissions(...) not working
Hello.
I have written a Java client that uses the metadata API in order to update the user profiles in an org. I am able, for example, to change the tab visibility on the profiles. However, when I try to change the object permissions for one of my custom objects on the user profile, using
When I update the metadata, no errors are returned, but the permissions on the user profile for the object remain unchanged.
Any idea what I am missing?
Thanks,
Carl
I have written a Java client that uses the metadata API in order to update the user profiles in an org. I am able, for example, to change the tab visibility on the profiles. However, when I try to change the object permissions for one of my custom objects on the user profile, using
ProfileObjectPermissions [] pers = new ProfileObjectPermissions[] { new ProfileObjectPermissions(Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, "MY_CUSTOM_OBJECT__C", Boolean.FALSE), ... }; p.setObjectPermissions(pers);
When I update the metadata, no errors are returned, but the permissions on the user profile for the object remain unchanged.
Any idea what I am missing?
Thanks,
Carl


You may find this helpful: https://github.com/palominolabs/sf-api-connector/blob/master/soap-api-connector/src/main/java/com/palominolabs/crm/sf/soap/ProfileObjectPermissions.java