You need to sign in to do that
Don't have an account?
Amarjeet
future method usage creating delay in field update
Hey ,I am using future method in one apex class which is used to calaculate and update some field value. But, I am getting the value updated after few secand/ few refresh. What can be the solution for this to update the field in the excat time without removing the future method?
Thanks in advance
Thanks in advance
You won't be able to make the callout synchronously from the trigger, because you would be holding up the transaction (and thus locking records etc) for a potentially long period of time.
If you want to make it as real time .. create a VF page button and process the API call on the on click button ..
All Answers
We are calling the future method from a trigger and we have to use future method bcoz of some other dependency. As we now for asynchronous process we can not control the time and getting the value populated after specific refresh/ delayed what can be the solution ?
Thanks
You won't be able to make the callout synchronously from the trigger, because you would be holding up the transaction (and thus locking records etc) for a potentially long period of time.
If you want to make it as real time .. create a VF page button and process the API call on the on click button ..
instead of that, we can use the VF page ??
window.reload() ;