0

I am creating the Screen Flow with Resource type as Record Choice set. IN the Choice Label I need the Parent object value. Getting Invalid error.

Created Record Choice set for contact object in the Choice label trying to fetch the Account.Name below screenshot for your reference.

Can you please help me on this?

enter image description here

enter image description here

enter image description here

7
  • As you are showing Contact can you confirm why do you need label as Account Name? Mar 1 at 5:16
  • My scenario is different, i have two picklists one for EntityDefinition and another one for RelationshipDomain by selecting the Parent Object in the entity definition need to display the child object for that in the second picklist. In RelationshipDomain I need to get ChildSobject.label. To make the question simple i was asking for Account and Contact Mar 1 at 5:48
  • Did you try executing the Query in Workbench SELECT Id, ParentSobjectId,ChildSobjectId FROM RelationshipDomain where ParentSobjectId='Account' Are you getting the result as expected. Based on this I can share the flow Mar 1 at 6:51
  • I tried from the salesforce inspector its working for me attached screenshot in the question Mar 1 at 7:25
  • Are you okay to have that in other screen component to show related object based on the first screen selection? Mar 1 at 8:09

1 Answer 1

0

As discussed in comments section this may not be possible in single screen element. It is possible in other screen element by storing the value which you selected in first element and then use that filter in second screen element.

enter image description here

Here selectedname is a variable which we are storing one user selects from screen1 as below.

enter image description here

But this would give ids for custom relations as ParentSobjectId gives the Id for custom relations. You may use RelationshipType field so it shows as below. enter image description here

As you said you may have to use some custom code to implement this like LWC and onchange action for it

7
  • Bro, in the Second screen you are using ChildSobjectId in the choice label, this will return the ID not the label right? need to display ChildSobject.label like this. Mar 1 at 15:22
  • No this will return the Name. Even in the screenshot which you shared in the question you will see that it returns Name for ChildSobjectId Mar 1 at 15:24
  • will return Name if its standard object. If its custom object will return Id updated the screenshot in question Mar 1 at 15:26
  • Yeah True. I missed it. Thanks for pointing it. Mar 1 at 15:27
  • As we cannot get ChildSobject.label we have to use Relationshiptype. Updated the answer with same details Mar 1 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.