Apex describe information should also give Field ID's - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
4,390  Points
Idea has been posted. Give it an upvote or downvote.

Apex describe information should also give Field ID's

Development (Apex, LWC & VF)

If you are planning to default input field values in an edit page for an Sobject, then you need to use something cryptic, like LKID hack. This hack requires you to pass field’s IDs as URL query params with default values for each, like:


This solution is really a hack, as there is no way in Apex describe information to know ID for a given sobject field. This makes your app or solution tough to port across the orgs, developers try to use custom settings to declare all such LKID fields, each one of them must be correctly updated by Admin post app installation.

Can't post more than 32,000 chars. So full details about the present problem are available in this blog post : http://www.tgerm.com/2012/02/field-id-lkid-describe.html


Merge Idea · Flag

Latest Comment from Salesforce

  • IdeaExchange Moderator - 5 years ago

    Hi Everyone- quick update from our product team, please see below:

    At this time, we have no supported solution for prepopulating field values in standard page layouts. The only supported solutions for prepopulated forms is (1) use a quick action and add it to the Chatter Publisher or Salesforce1, or (2) use a custom URL button with URLFOR() and pass field values -- not using the field IDs as parameter names -- into a Visualforce page and handle the query string parameters in the controller.  We're investigating other methods to prepopulate field values in pages, but don't have a timeline for it yet.
  • Upvotes
  • Downvotes



from AppExchange

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.