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

All Ideas

Idea Details

Post an Idea
4,150  Points
Under Consideration
Idea is being considered for release, but development hasn't started. We post updates every three releases.

Apex describe information should also give Field ID's

Apex

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:

https://na1.salesforce.com/a02/e?CF00N30000001cYtG={!Case.CaseNumber}&CF00N30000001cYtG_lkid={!Case.Id}&retURL=%2F{!Case.Id}&saveURL=%2F{!Case.Id}

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 - 3 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

Ideas

Apps

from AppExchange

Questions

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.