Quantcast
Channel: Get object apiname based on recordid in lightning web component - Salesforce Stack Exchange
Browsing index pages (3 articles)

Get object apiname based on recordid in lightning web component

Is it possible to het the object apiname based on a recordId in a lwc without a call to apex?Something like apex but then without going to backend:Id recordId = '001g000001jmmCA';System.debug('Object...

View Article


Answer by sfdcfox for Get object apiname based on recordid in lightning web...

You can use getRecord and pass in the recordId parameter to get the Record response, which includes the apiName property. You still will need a call to the server, but you won't need any Apex.

View Article


Answer by Jeff Callahan for Get object apiname based on recordid in lightning...

Another option is to use @objectApiName

View Article
Browsing index pages (3 articles)


Latest Images