• Gulshan Ara 7
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I wanted to understand that if i am calling an apex webservice method on a javascript button click via execute method like below as a sample

var result= sforce.apex.execute("methodname","param",{Id:Id});
document.location.reload();

so is the sforce.apex.execute method work as async or sync? will the document.location.reload() have to wait untill i get a response from my apex method or it will refresh my page.

My problem is i really want to execute it async and just make a call to the apex method where i am handling all the stuff via platform events and on front end just want to reload the page. but currently it seems like it blocks the page reload untill all functionality at the backend complete and than proceed. 

Any help in this regard will be appreciated.