Field Update based on Another Field

  • 1
  • Question
  • Updated 5 years ago
On the account object I have a picklist field called Account Manager. I would like to use the value of that field to pre-populate another picklist field (Manager) on a new opportunity. After clicking new opportunity, the user would have the option of changing the Manager picklist value for the new opportunity or leaving the pre-populated value. Is this something Skuid can do? Thanks you.
Photo of Aaron

Aaron

  • 140 Points 100 badge 2x thumb

Posted 5 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yes,  this is possible with Skuid. 

On your account page include a button for "new opportunity"  and in that redirect url include an extra parameter that sends the account id field.    The redirect url will probably look somthing like this in Skuid:    "/006/e?accid={{Id}}" 

In your new opportunity page make a first model for "account"   that has as its condition that the account ID is passed by the parameter "accid".   In this model bring in any data from the account that you want to prepopulate onto the opportunity.  Account name for sure,  but manager too. 

Build a second model for the new opportunity.  Add conditions for each field you want prepopulated.  They should be related to the associated fields in the account model using the "field from another model" type.  This will bring those values into the new record as defaults - but you can over-write them if you want before saving the record back to the database. 

Hope this sketches out the solution. 
Photo of Aaron

Aaron

  • 140 Points 100 badge 2x thumb
Rob,

Thanks for the quick response.

What I am asking goes beyond that (and now that I think about it probably can't be done without code).

The field I want to auto populate is an opportunity picklist field. However, I want the auto population to be based on a separate picklist field located on the account.

1. From an account the user would click new opportunity, 2. The opportunity picklist field is auto populated with a value derived from the account picklist. 3. The user can change the value if needed. 4. Changing the opportunity field's value doesn't impact the account picklist's value.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Do you want the value that appears pre-populated on the new opportunity record to come from the account data,  or do you want a filtered set of picklist values to be selectable on the opportunity, based on data in the account? 

The first scenario seems to be what you are describing (and what you lay out in your numbered steps).  It is totally possible - and is what I laid out above.  I assume you have followed those instructions and created a "account model" that brings in the account picklist field value,  and the opportunity model.   The opportunity model should have "load data" turned off, and "create row" turned on in the advanced tab of the model properties.   Build a condition on the opportunity model  -- Opportunity Picklist field = field from another model - Account Model - picklist field.   Even though they are different fields,  the account picklist value will be passed into the opportunity field as a prepopulated value.

 
Photo of Aaron

Aaron

  • 140 Points 100 badge 2x thumb
Okay Rob - I shouldn't have doubted the Skuid. Thanks for the response, it worked perfectly.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Glad it worked.  I think I'll pass that quote on to our marketing folks "Shouldn't doubt the Skuid"   Its a good one.