0

I have a Case object which has 'Category' picklist with values 'Plumbing','Electrical' etc to handle the issue customer is reporting. Need to have a child object 'Parts' and it needs a Parts Picklist with values 'Pipe' ,'Elbow joint' , 'Switch','Wire'. We need the 'Parts' picklist on child object to show only the relevant values based on selection of 'Category' at case level. Is this possible at all using configuration or will this need a Lightning component ?

Tried workflows, flows to stamp the parent value on the child record but it simply doesn't constrain the child picklist while the record is being created first time. Subsequent edits do respect the constraint.

Any advice on how to proceed ?

Thanks.

2 Answers 2

1

Have you tried a solution mentioned at https://trailblazers.salesforce.com/answers?id=9063A000000tJbIQAU

So if the controlling picklist is on the Parent object with values "A,B,C" and the dependent picklist is on the Child object with values associated to "A,B.C", you can re-create the parent controlling picklist "A,B,C" on the Child object and re-create the picklist dependency on the child object too. The workflow, on updating the parent object controlling picklist, will update the Child controlling pickklist, which has the same values, and then the dependency is done.

1
  • Thank you. Yes i did review this and couldn't get it to work as the child record does not exist yet (it is being created in the UI) . So the workflow cannot update it. The validation rule suggestion on the same post makes sense. Trying it now. So there is no real constraint in values displayed but a constraint in terms of what can be selected and saved.
    – Adith
    Mar 6, 2021 at 11:51
0

Assuming these are single select picklists, one other option is to use different record types on the parts object.

You can control which picklists values are visible for the record type.

When you create the child record from the case, you would need to pre select the record type appropriately. That could get interesting, I could url hack my way through it in classic, but would need to think about how to make it nice for lex.

3
  • Thanks Gorav. Yeah the idea was not not to make the user select a record type again as the category on the parent is supposed to drive this. Unfortunately there is no way to default the record type selection, correct ?
    – Adith
    Mar 6, 2021 at 11:53
  • It may be possible to set recordTypeId via officially supported url parameters in lightning. If that works, you could use some logic in the button to set the record type Id based on the value of category on case. Not pretty but might work. More info on lex url params here. thewizardnews.com/2020/01/27/…
    – gorav
    Mar 7, 2021 at 13:24
  • The sf docs say recordTypeId is not currently supported...NOTE Passing the RecordTypeId to defaultFieldValues isn’t yet supported. The recordTypeId influences routing behavior, layout assignment, and page assignment, so you can see unexpected results if you try to use it.
    – gorav
    Mar 7, 2021 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .