Call JavaScript in a button interface

Hello

Hello.
I have a requirement in which I need to make an AJAX call using JavaScript in a button, does anyone knows if this is possible?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You can have a button submit a form, and after submit send process flow to a node that calls a webservice or plugin.  Your webservice could contain potentially any code you want, including an AJAX call, and your plugin would be Java, which can do theoretically anything Java can do.

    If you're attempting to make AJAX make the Appian screen instantly refresh, I don't know how that will work.  You could probably change some local variables and set the form to reevaluate the instant that happens with the new a!localVariables from 19.2.

    You also might be able to call a custom rule built from a plugin inside the saveInto block of a button that's not configured to submit.

    It all depends on your specific use case.

Reply
  • 0
    Certified Lead Developer

    You can have a button submit a form, and after submit send process flow to a node that calls a webservice or plugin.  Your webservice could contain potentially any code you want, including an AJAX call, and your plugin would be Java, which can do theoretically anything Java can do.

    If you're attempting to make AJAX make the Appian screen instantly refresh, I don't know how that will work.  You could probably change some local variables and set the form to reevaluate the instant that happens with the new a!localVariables from 19.2.

    You also might be able to call a custom rule built from a plugin inside the saveInto block of a button that's not configured to submit.

    It all depends on your specific use case.

Children
No Data