0

I'm looking to utilize a rest api to retrieve details that I'd like to show on a salesforce record. Is it possible to show this info in real-time, for example when a page loads the API call is made.

I've tried putting a LWC on the lightning record page which calls an apex method that does the API call. The API call was synchronous. Though it worked, with further testing there were some recursion issues which delayed saving certain records. So for now I am thinking of making the API call asynchronous (future call) as that works. However when the user visits a page of the record the info does not show in real time, they'd have to refresh.

Any strategies to allow the data to show upon the page load (so a synchronous API call) AND prevent any type of recursion issues?

1 Answer 1

2

There's no such thing as a synchronous API call in Lightning. I think you may be looking for a Continuation, as that would allow the call to be completely asynchronous in Apex, yet still return data to the client when it becomes available.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .