You need to sign in to do that
Don't have an account?

Calling javascript method from Apex Trigger
Hi,
I need to call a javascript method, which in turn is using a web-services call from Apex Trigger.
Please advise the best way to do that.
Thanks,
CA Technologies Developer
Hi ,
you can make a web-services call direct from apex without javascript.
write a class and and inside a method, make web service call from there . Now you can call the class method from the trigger.
Is there a specific reason to use javascript here ?? if yes, please explain your use case ..
Please mark it as the solution if it answers your question so that others can also take benifit.
Ckeck My Blog
Hi,
For achieving this put your JavaScript on a VF page and open the page from the Apex class after that call the class method in your trigger.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Niket,
I am trying to use the Ajax Toolkit methods in order to update UserTerritory object, since i cannot update it using Apex.
How do i call them from Apex (the Ajax Toolkit create/update methods)?
Thanks,
CA Technologies developer
Do what Niket said. The trigger's context is purely server-side, and JavaScript is interpreted on the client-side, so these two don't mix.
Just call the class from the trigger directly.
Hi,
Can you give the sample example for this...
Thanks in advance..
Thanks,
Rams