Pages

Sunday, May 7, 2017

Finding RecordType access to different profiles by using Metadata API

Consider a scenario in which you have an object which is having more than 10 recordtypes. Now you need to find out which all profiles have access to which recordtype. In order to achieve this, admin has to go to each profile and check the recordtype access. Imagine if you have more than 10 profiles which have access to different recordtype of this object.

In order to avoid this manual effort, I have created a VF page where user can select object and particular profile or all profiles and can see the result on a report. I am using metadata API to achieve this.

Please find below unmanaged pakage installation URL:

https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000NPA0

Or you can download the code from Git by using below URL:

https://github.com/Sunil02kumar/RecordType-Access-For-Profiles

After installation,  open tab "RecordType Access Finder". You may get "Unauthorized endpoint URL".


Add endpoint URL to remote site setting.

After opening the tab, select the object and profile for which you want to get report for recordtype access to different profiles. You can also specify "All" for profiles.




If you are getting some error by selection all profiles and clicking on "Retrieve and generate report" button, then it means you profile metadata file size is more so in this case, select one profile at one time and click on "Retrieve and generate report" button.
After this operation is finished, then select another profile and again click on "Retrieve and generate report" button. Repeat same process for all profiles you want to check.

Now click on report link and you will be redirected to SFDC standard report where you can see different recordtypes assigned to different profiles.



Looking forward for everyone's comment and feedback!!!

More Blogs>>: 
DYNAMIC APEX IN SALESFORCE   
SOQL INJECTION IN SOQL   
CUSTOM METADATA AND CUSTOM SETTINGS IMPLEMENTATION TRICKS   
SMART TABLE USING ANGULARJS IN VISUALFORCE PAGE   
REST API TUTORIAL FOR SALESFORCE   
VISUALFORCE COMPONENT FOR RECORD STATUS BAR   
DYNAMICALLY CREATING AND DESTROYING LIGHTNING COMPONENTS    
RAISING AND HANDLING CUSTOM EVENTS IN sALESFORCE lIGHTNING    
WHY TO USE DESIGN RESOURCE AND HOW TO ADD DYNAMIC OPTION TO DATASOURCE    
PASSING INNER WRAPPER CLASS TO LIGHTNING COMPONENT    
LIGHTNING COMPONENT FOR RECORDTYPE SELECTION FOR ANY SOBJECT    

4 comments:

  1. A nice article here, i think that people who have grown up with the idea of using computers are showing more responsibility towards writing posts that are thoughtful, do not have grammar mistakes and pertinent to the post..
    Home Interiors in Chennai

    ReplyDelete
  2. Report Link is Not Generated.

    ReplyDelete
  3. it doesn't generate the report link ?

    ReplyDelete
  4. Collection size 1,489 exceeds maximum size of 1,000. do you have any other app that has large limits

    ReplyDelete