Salesforce Fact #883 | Careful while accessing getObjectInfo to get record type details
We need to be careful while using getObjectInfo module to access the record types in LWC. We can access the record type name property and there is no developer name property present. The name returns the label of the record type and if translation is present for the user language then the translated value is returned.
So, we need to be careful while doing any check to match the record type name.
There is an Idea already submitted to add the Developername in the data returned: https://ideas.salesforce.com/s/idea/a0B8W00000H50x7UAB/include-developername-in-the-recordtypeinfo-returned-with-getobjectinfo-in-lwc
Attached are the screenshots.
Comments
Post a Comment