Saturday 22 December 2012

Salesforce Tips

#1. Taking up a Backup using ANT in Salesforce: 

While using ANT for taking backup from any org and get following error java.lang.OutOfMemoryError: Java heap space

Please update your bat file by this 
set ANT_OPTS=-Xmx1024m
ant -f build.xml -propertyfile build.properties -logger org.apache.tools.ant.listener.MailLogger
pause

#2. Auto Number feature in salesforce.: 
Auto Number Type field's value continuously gets increased in data creation in Test Class ( even it is test class data is virtual/temporary data) .it affects Auto number in organisation..

Wednesday 5 December 2012

Mass Edit profiles using Enhanced Profile List



It is very lengthy work to give permission of object to any profile and it becomes tedious when profiles come in 
hundreds.  

Here we will talk about editing profiles in bulk. Some time there are some cases where we need to modify object level permission for many profiles some time all profiles and it gets complicated if it is in 100s. 
Here is a way to edit all profiles at once.

1. Navigate : Setup>Manage Users > Profiles
2. Create a new list view 
3. Fill Name this list view let say "Test mass profile list view". Leave other setting as it is. In last section "Select Columns to Display" 
   you may select some column for easy to work on list view(it depends on your requirement).
4. Now your list view is ready to use.
   There are two way to work on this
   A) If you click edit link in "Action" column then profile gets open in edit mode
   B) If you want to change a specific permission of that object then ( please include this permission in to "Select Columns to Display" ) and then just you need to 
     double click over this and one small popup wizard will be opened where you can change it as per your need.