Pages

Monday, July 20, 2015

Salesforce: Sharing Button URL

We have discussed Sharing button sometimes back in our blog Salesforce Sharing Button. Sharing button in Salesforce give user ability to grant access to other user more permissions to certain record.

But, on top of just give additional access to other users, there is also a button called Expand List, where it will show all users who have access to the record, admin can use this functionality to trace record sharing access level and the reasons when need to support.

But, for some companies, users are not allowed to manually share record accessibility, so admin or consultant who implemented Salesforce will take this button away, this will also cause admin do not this functionality to trace record sharing easily.

Options available:
  • Create a new page layout for admin with Sharing button - this is not really nice as you need to maintain another page layout just for the sake of this
  • Manually add and remove the button when needed, this is more easier, but if you have proper Change Management, this will cause issue as you do not have good reason to keep updating the page layout.

URL
Actually, when you click that button, salesforce will bring you to a URL. So, manually type the URL will parameters will give you the same functionality with clicking Share button. 

Account
https://ap1.salesforce.com/p/share/AccSharingDetail?parentId=00190000007Gyno

Opportunity
https://ap1.salesforce.com/p/share/OppSharingDetail?parentId=0069000000aXoxH

Contact - not applicable for Controlled by Parent sharing setting
https://ap1.salesforce.com/p/share/ConSharingDetail?parentId=0039000000C26VC

Lead
https://ap1.salesforce.com/p/share/LeadSharingDetail?parentId=00Q90000003UQDa

Custom Object
https://ap1.salesforce.com/p/share/CustomObjectSharingDetail?parentId=a0J900000005pWa

Just change the instance name to your instance name, use correct parameter based on the object, and put in the Record Id, you will get the same result as clicking Sharing button.