STUDIO-186 : Function to execute a javascript method and get the Response value