function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
junaid_ajjunaid_aj 

Display result of @future method in page

We are able to write the @future method and retrive the value.

But if we want to use the result obtained in this method to diaplay in the page.

we are getting the following error

 

@future call currently not allowed

 

An unexpected error has occurred. Your development organization has been notified.

 

Can we get a solution to display the result obtained from @future method in the page.

HarmpieHarmpie
@future is only available in developers preview at the moment (but can possibly be activated). Having said that... I think to display the results in A page, you will have some latency, as the @future methods only executed after a given amount of time. When you have the @future executed, reloading the page (or a portion of it) in a few seconds (<apex:actionPoller> ???) might give you the desired results.