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
krish4ukrish4u 

On Complete Issue

Hi Guys,

We have two methods after execute the first method need to execute another method based on the first method.

we are updating a record in first method after success of the first record we need to execute the second method but the second method is webservice method we can't call directly from the method. 

So using oncomplete executing the one by one but if the record update failed i need to stop the execution of second method. I have tried using if condition in oncomplete but not able to do.

Any suggestions

Thanks,
Krish
Ajay Nagar 7Ajay Nagar 7
Hi Krish,

Maintain a boolean flag which is bind with hidden field,set this boolean flag as per success/failure and rerender it oncomplete ,then call a jquery function instead of web service .In this jquery function get value of hideen field and on the basis of its value you will know its success/failure and then call web service if hidden field has success result.

Thanks
Ajay
krish4ukrish4u
Thanks Ajay.