3

I have a webservice callout, and therefore I update a field on pagelayout according to the callback. The problem is I have to refresh the page layout (F5) everytime to see the field updated on my page layout. Is there any solution to automatically refresh the page layout?

5
  • 1
    are you calling webservice from custom button or something else? if custom button then use javascript to reload VF page
    – Ratan Paul
    May 23, 2016 at 8:37
  • It's not a VF page, it's a standard pagelayout. The webservice is calling via trigger when meeting some criteria.
    – LoveLace
    May 23, 2016 at 8:41
  • then I am afraid. You don't have another option you need to wait untill webservice update your fields.
    – Ratan Paul
    May 23, 2016 at 8:48
  • 1
    The field is updated in the database.. the only issue is to show the new result on the page layout !!!
    – LoveLace
    May 23, 2016 at 10:22
  • If callout is synchronous then it should reflect the data. I think you are making future callout. Try to remove @future.
    – userdks
    Apr 21, 2020 at 3:14

2 Answers 2

0

You can let the page refresh itself every couple seconds, minutes, etc... You can do this in JavaScript.

setTimeout(function(){
   window.location.reload(1);
}, NUMBEROFMINUTES*60000);

Replace the NUMBEROFMINUTES with how many minutes you want to wait before the page refreshes by itself.

1
  • Since it is a standard page layout you may want to add a VF page section for the field and then use javascript to refresh periodically?
    – addy
    May 23, 2016 at 16:28
0

I think you have 2 options:

1) you remove the callout from the trigger and add it to a custom button or flow, so that you can display the result in the screen as part of the same transaction.

2) When the field is updated, send an email to the owner (via workflow) to let them know the transaction has completed and that they should refresh the page to see the latest changes.

You must log in to answer this question.

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