LWC newbie here. I am creating a LWC that will go on record pages of specified objectApiNames. When the user clicks the button in my LWC, depending on objectApiName I have to retrieve certain SObjects in order to make some decisions as to where to redirect the user (no retrieved data needs to be rendered in my LWC).
Most samples of getting data are focused on data that needs to be rendered and/or @wired/getRecord. I don't see any way to use getRecord from within a js function. Am I missing something here?
Of course the other option is to call an APEX function to the data retrieval.