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
VibzzVibzz 

How to lock screen while waiting for response of async call

Hi,
We havesalesforce trigger is written on account object to call a web service async.We have 120 seconds timeout set up in salesforce.
I want to make account uneditable until ,it gets response from web service.
Please suggest how can we achieve this?

 
Shaijan ThomasShaijan Thomas
You can run a popup once you start the callout. And run a actionstatus in popup window. set popup value false after some time 1 min. or based on the response
thanks
Shaijan
Gil GourévitchGil Gourévitch
Hi,
You can use 2 fields :
- One checkbox "locked" that the trigger sets to true,
- One image with a lock open/close depending of the previous field.

When the triggers fires, it sets the "locked" field to true, then calls the webservice. When receiving the response, it re-updates the record with "locked" = false.
Be ceraful not to fire again the first trigger (use condition with "locked" value)


Hope this helps
Gil

Question Solved ? Please mark as the best answer to help other users !