function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce2015Salesforce2015 

Dependent formula field

Hi Experts,

We are using Opportuities Object, and two standard picklist fields.
1. Standard Picklist Field: Type
2. standard Picklist Field: Stage

Type having below three picklist values.
New Business - Staff Aug
Existing Business - Staff Aug
New Business - Turnkey

If user select type picklist value, accordingly it will show below stage values.
Please find below image

Dependent Picklist values

Please anyone sortout my issue.

Thanks,
Manu
JayantJayant
Standard fields and their behaviour can-not be modified. StageName can only be filtered based on Sales Process.

You can create two custom picklist fields - Stage and Type, set up the dependency and use them on the layouts.
You may have workflow field updates to replicate values from custom to standard fields.
Alex Edwin 8Alex Edwin 8
Hi Manu,

 You can try dependant picklist. The controlling list shall be Type and Dependant field shall be Stage. The process is very intiutive. 

You need to go to Opportunity  --> Opportunity Custom Fields & Relationships --> Field Dependencies (next to the new button)

Thanks,
Alex.
Anupam RastogiAnupam Rastogi
Hi Manu,

I agree with Jayant. Salesforce does not allow using Standard Picklist fields as dependent field. Therefore you have to use custom fields here.

And I also understand that not using the vanilla Stage field on opportunity would mean loosing on certain predefined functionalities like Stage-Forecast Mapping etc.

So you can do the following - 

1. Create a new picklist field for storing the custom Stage field values.
2. Create a new Field Dependency within the Type field (Customize -> Opportunity -> Fields -> Type -> Field Dependencies) and pick this new custom Stage field as the dependent field.
3. Create all picklist values that are possible for the custom Stage field for all different Type values in the standard Stage field.
4. Remove the standard Stage field from the Opportunity or any other Page Layouts, and place the custom Stage field instead.
5. Create a new WF Field update rule that triggers whenever the new custom Stage field is updated, and update the standard Stage field value with its value.

So basically what we have done here is that we have removed the standard Stage field from the UI, placed a custom Stage field that can be used in a field dependency. And to make use of any vanilla functionalities based on the standard Stage field, we will continue updating it with the latest Stage value getting picked in the custom Stage field through the UI.

I am sure this work well.

Thanks
AR

If you find the reply useful that solves your problem then please mark it as best answer.
 
Salesforce2015Salesforce2015
Hi Jayant/Anupam,

Yes, both of you correct.
But we are using basic SF License. It is not having Workflow/ VF/ Apex.
So, now you got better idea. I need to achieve my situation with only formula field.

Anupam you are correct Stage having other fields information also.

Thanks,
Manu
Anupam RastogiAnupam Rastogi

Hi Manu,

Are you using Forecasting in your application? Because if you do use it and are not having access to Apex, WF or VF then there is only one way to resolve this problem as I can think of right now. It is not quite a good way but is a work around. And I think your client should also agree to it considering the limitations due to the license.

1. You can put in the union of all values that are possible for the Stage field in the standard Stage field pick list.
2. And as we cannot have a standard picklist field as the dependent field, create validation rules on the Stage field that checks for valid Stage field value based on the Type field value selected.

So basically you need to add all picklist values available for Stage field for all Types. And check the valid combination of Type and Stage field values using a validation rule. Throw an error when incorrect Stage value is selected.

Anyway, do you have access for setting up Record Types for Opportunities? If yes, then let me know, I have a better solution using it.

Thanks
AR

Salesforce2015Salesforce2015
Hi AR,

Yes, having record type access.
Anupam RastogiAnupam Rastogi
Great, then give a try to the following solution.

1. Add all possible values for the Stage field in its picklist.

2. Create three new Sales Processes each representing set of Stages for a particular Type field value. So example, the first Sales Process should have only those Stages selected which are applicable for Type = New Business - Staff Aug.

3. Create three new Record Types each corresponding to a Sales Process. You can name them after the Type field values - 'New Business - Staff Aug', 'Existing Business - Staff Aug', 'New Business - Turnkey'.

4. Within each record type, for the Type field, choose the respective Type field value as default.

5. Make the Type field read only on the Page Layout so that user cannot modify it. 

And you are done. So basically what we have accomplished is - as we were not able to establish Field dependent relationship between Type and Stage fields directly, we have used Record Types to achieve the same. And by defaulting the Type field value for each record type appropriately along with making it read only on the UI, we will still be able to control its value as well.

So in turn using Record Type we will be able to control the Type and Stage field values as required.

Thanks
AR

If this resolves your problem then please mark it as best answer.
Anupam RastogiAnupam Rastogi
Hi Manu,

Were you able to implement Record Types and achieve the desired results?

AR