You need to sign in to do that
Don't have an account?
jawtech
javascript eval in Apex?
Is there any way using any tools to evaluate javascript code (a retrieved string) inside Apex? Ideally I'm looking for something similar to the eval function of javascript but run within Apex.
thanks!
James
Cloudbench Applications
providers of BasicGov.com
No tools as such, but you have to write the equivalent logic using Apex.
I am afraid, there is no direct function similar to EVAL:(
Experts, correct me if I am wrong.
Cool_D
Thanks for the replies everyone. It saved me the headache of prototyping something. We were using scontrols to pull scripted functions stored in the database and then running them inline. That way each of our clients can customize their own behaviour without us writing custom code for each organization. It was very cool because it was used to build a much more complicated workflow engine which we now implementing in Apex.
I guess I'll set up a webservice that receives the javascript, and parameter values, execute it and returns the result. A lot more work compared to scontrols. I know scontrols can call Apex, but not the other way around :(