Salesforce Fact #267 | Reusable LWC to get RecordTypeId of current record
We can have a reusable LWC component which can be used across all the object record pages which have record type available. Suppose, we need to get the recordTypeId of the current record and that is a common requirement for multiple Sobject record pages. In that case, we can have a generic LWC component which accepts the current record Id and current SObject type as input and passes the same to apex controller and returns the record type Id for the current record.
Attached are the screenshots.
Comments
Post a Comment