Deploying from Sandbox - Loss of Permissions, Page Assignments, Field Security etc.
- When you add profiles to assign permissions in a change set, it only impacts the components of the change set. Change sets are never destructive, so they can't remove permissions you've assigned in production. You are safe to include the profiles during the change set deploy.
- Just be aware some Profile settings are always transferred when you include the profile in the change set (e.g. Profile's system permissions). To avoid overwriting the production profile settings from sandbox, simple solution is to first send change set with anything (e.g. Account custom field) which is the same on prod and sandbox + all profiles from prod to sandbox - this will apply the production permissions to sandbox - and then you can send your change set from sandbox to prod. As sandbox has already been updated to prod status, you won't overwrite anything and only add new stuff to the profiles on prod.
- Long story short, the only permissions that get deployed for a specified profile are exactly related to the other items in your deploy. If you have a 1 field, 1 visualforce page, and 1 page layout, only the permissions related to those 3 objects will be pushed to the target org and the remainder of the permissions will be in tact. It will not overwrite other permissions.
- delete [select Id from testObject where flag='test' LIMIT 10000]
- Database.delete("[select Id from testObject where flag='test' LIMIT 10000]", false);
* DML statements can only process up to 10,000 records at a time
Comments