Reference Object fields when setting default values - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
2,950  Points
Open
Idea has been posted. Give it an upvote or downvote.

Reference Object fields when setting default values

Process Automation



When setting a default value for any field on a specific object, I cannot reference that object within the formula. However this can be referenced when using a field update with workflow. This seems like I am creating a whole lot of workflow for for a function that should be standardized.

Merge Idea · Flag

Latest Comment from Salesforce

  • Shannon Hale - 7 years ago

    There are two challenges with this idea that will likely prevent it from ever being implemented as a property on the field like this.
    (1) Default values are populated at the time the form is rendered, to prepopulate the field and save the user some work, and also encourage the right values to be entered. At rendering time there is no data in any other field on the record, so any reference to another field on the same record would always return a blank value.  Workflow field updates, on the other hand, are executed after the database transaction that inserts the record -- by which time data in other fields has been populated.

    (2) Because default values are specified at the database schema level, there is no context available -- there is no way to determine at this level if the the record is being created as a child of another record, or what the object type of that record is. For example, when creating a contact, we don't know at the schema level whether it's being created from an account, case or other object that it has a lookup relationship to, or from the New button on the Contacts tab. So we can't use a cross-object reference to the parent to get the possible fields.

    In Summer '13 we've introduced the concept of "predefined values" on a new type of custom action. Predefined values allow you to reference fields from the parent record when creating a new child object: for example, you could create an opportunity custom action on an account, and specify a predefined value for the opportunity name so that it is set to the account's name + the current date. Because the action is context aware (you created it on the account), the field values are available from the parent. You still won't be able to reference fields on the opportunity itself, because those still aren't available until the new opportunity is inserted into the database. For more information, see the "Publisher Actions" section in the Summer '13 release notes.

    Custom actions are only available from the Chatter publisher in Summer '13 but we plan to expand this functionality throughout the platform in future releases.
  • 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.