Friday, March 7, 2014

Continued... Salesforce URL Hacking to Prepopulate Fields on a Standard Page Layout using Tooling API

Here are the pros and cons using Tooling API in force.com development purpose. In my earlier post here to get the CustomField Ids and auto populate some of the CustomObject field values on Standard layout I used Tooling API to get it done. But......

Cons:

1. This process won't work other Salesforce users apart from Admins or equivalent privileged users only. This is no where documented, but this API meant for external languages to build tools for force.com, in this way some what very clear that we should be careful while using these type of APIs.

2. Only work with CustomFields on CustomObjects

Pros:

1. Not required to store the static CustomField Ids in a CustomSettings or CustomObject.

2. Not required to hack the URL with static CustomField Ids.


So I did a work around as inserting the Tooling API information in a CustomObject so that I can use this CustomObject to fetch the fieldIds and auto populate the values for the same for Salesforce users who are not admins.


Happy coding.....





No comments:

Post a Comment