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 Name: '+ recordId.getsobjecttype());
I currently have a handleRowAction(event) which gets the record id from a lightning-datatable which dynamically gets fields and values as a replacement of related lists. I use this component several times on e.g. account record, so on handle handleRowAction(event) it would be easy to get the object by recordId so I can pass recordId and object to a lightning-record-form:
<lightning-record-form record-id={recId} object-api-name={sObj} mode="readonly" layout-type="Full" columns="5" fields="Name">
I already solved this by an apex call to the backend but was wondering if this could be done easier.