0

I am creating an app, that will be loaded into other orgs by a package. One of the functionalities is populate custom field value by using salesforce Id.The custom field would have a different id in every org... how can i place that salesforce id into the URL without knowing the actual id giving to it.

Please advise on this

1

1 Answer 1

0

The field ID values do vary from org to org (as presumably they are allocated as each field is created) and a supported mechanism to obtain these IDs has not been provided by Salesforce. See Apex describe information should also give Field ID's and vote for that too. That idea links to some of the hacks to work-around this missing mechanism.

The most conservative approach is to add a custom setting to hold the ID values and take them from there. But you then need to have a fairly technical person manually find the IDs after the app is installed and set them in the custom setting - far from ideal. You can also combine that custom setting approach with the tooling API call described in How to get the entity ID for a custom field in Apex? (mentioned in Eric's comment) as the field ID only needs to be obtained once and can then be accessed from the custom setting thereafter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .