Skip to main content
Nintex Community Menu Bar
Question

Default value in Salesforce Reference field

  • July 11, 2024
  • 1 reply
  • 3 views
  • Translate

Forum|alt.badge.img+1

I’m trying to set a default value on a reference field on page load in Salesforce. I’ve tried using the Default Items option under Override using both a fixed ID value and an ID from another model. Neither way populates the lookup with a value. Is there some other trick to set a default on a reference field?

Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 12, 2024

lisaa - the “metadata override” method requires you to set up more of the plumbing about reference fields than I think you want to.

The easiest way to set a default value on a new record is to use model conditions. Though you usually think of these as impacting what data is queried, they also can be used to set default values on new record creation. Using the “Field from another model” condition type is a great way to do this. Just make sure the model that is Source for this data is above the Target model - so that the data is available to be passed as default on page load.

Here is an example configuration:

Here I’m passing the Id value from the Account model into the “Account ID” field on a new opportunity. Make sure you have the Id and the Name field retrieved in the Account model.

Let me know if you have further questions.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings