Activity Forums Salesforce® Discussions While making an async call from the Visualforce controller, how can one link the page again?

  • shariq

    Member
    September 12, 2018 at 5:28 pm

    Hi Avinish,

    By understanding your question, you want to perform asynchronous action through button or link etc that will reflect on the Visualforce page.

    Suppose you are executing batch on Command button and setting variable to some value and reflecting that variable on page, there are two possible ways which I am thinking now to do it :-

    • You can create a section(div or output panel) in which you want reflect the value and rerender it on a button click every time until it reflects on the page or you can write a script to rerender it after every few seconds and stops when the action(variable is shown) is done.
    • Second approach is to save the values in database and query it on page. At first time when page loads the records list will empty but after batch runs the records(values) will be created, then after refreshing the page will show that inserted list. You can design a logic for filtering the records(created today or yesterday etc).

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos