1

I have a scenario where i have LWC component A and in its html it uses LWC component b (In this LWC component i have built the picklist dependency + record type). So that in component A in HTML i pass like this.

<c-component-b
   recordtypevariableinComponentB={getRecordTypeId}> </c-component-b>

In component A in JS , i am passing the record Id and trying to get the recordTypeId. However after getting the recordtypeId and when i am trying to pass it to the variable 'recordtypevariableinComponentB' and refer it in getPicklistValues method it is not showing the picklist values.

This is somewhat similar issue like this -

Get picklist values on record type(not a default) without hard-coding of record type id and object have more than one record type

Where i did not find any solution. Can someone please help.

2
  • Hi Ajay. Can you please post the js code you are using to get the recordId and picklist values? Dec 19, 2020 at 6:35
  • @SophiaGigliotti: The code is huge , it would be tough to understand. But i have achieved this, basically what i have done is i embedded this LWC inside a screen and when user opens the screen from the case the record id and record type are passed into the flow as variables. I have used the flow variable for record type in the LWC so that i can get the dynamic record Type Id.
    – Ajay
    Dec 19, 2020 at 16:15

1 Answer 1

0

Solution:

I embedded this LWC inside a screen and when user opens the screen from the case the record id and record type are passed into the flow as variables. I have used these flow variable from flow and passed it via JS Meta.xml to the LWC variable and from there i was able to get the record type in the LWC dynamically.

You must log in to answer this question.

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