Automate

 View Only
  • 1.  Custom Button does not kick off Custom Rules

    Posted 5 days ago

    I have a custom button that on click runs a webservice. There are 2 rules assigned to the button that are custom javascript functions.

    When I run the form the webservice runs, but the two rules do not.

    I do not see them run in the console and even changed the names of both functions in the rules to function names that do not exist and I see no errors either.

    Any thoughts on cause/solutions?

    Thanks,

    Stapuff 

     



    ------------------------------
    Kurt Marshman
    Old World Industries, LLC
    ------------------------------


  • 2.  RE: Custom Button does not kick off Custom Rules

    Posted 4 days ago

    Hi Kurt,

    not working custom rules can have many causes. Most likely there is a typo in the commands, like a capital or non-capital at the wrong location, or arguments used at a command. There is no errormessage, but the script simply isn't executed.
    In case of multiple commands you can check what is working well, by executing each command separately in the console.

    Good luck!

    Ronald 



    ------------------------------
    Ronald Vlasveld
    Master data specialist
    Industrie- en Handelsonderneming Vreugdenhil B.V.
    ------------------------------



  • 3.  RE: Custom Button does not kick off Custom Rules

    Posted 4 days ago

    Hey Ronald,

    I appreciate the response.

    Both functions were tested when they were attached to a text field and kicked off every time (viewable in console) until being added to the button.

    Thanks,

    Kurt



    ------------------------------
    Kurt Marshman
    Old World Industries, LLC
    ------------------------------



  • 4.  RE: Custom Button does not kick off Custom Rules

    Posted 4 days ago

    I have the same issue, I just upgraded to 25.1 and rules do not run on a button that runs a webservice. I have a simple show rule rule on a button it is the only rule. The button runs the webservice but does not run the rule. I think this is a bug.



    ------------------------------
    James Polley
    RAYTHEON COMPANY
    ------------------------------



  • 5.  RE: Custom Button does not kick off Custom Rules

    Posted 4 days ago

    James,

    I appreciate you noting having the same issue. Many say nothing.

    Kurt



    ------------------------------
    Kurt Marshman
    Old World Industries, LLC
    ------------------------------



  • 6.  RE: Custom Button does not kick off Custom Rules

    Employee
    Posted 4 days ago
    Edited by Sigrid Kok 4 days ago

    Hi Kurt

    To add to what the other suggested, it's best to have the web service be the last step/rule for your custom button.

    Are you trying to do something before the web service run?

    If you're trying to do it after the web service run, it may be better to add the rule to the logfield from the web service.

    If none of the suggestions here help, please add more details of what you're trying to do, any logs you may have and if possible the solution or a test solution that replicates it. I can ping some taller foreheads to take a look.

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 7.  RE: Custom Button does not kick off Custom Rules

    Posted yesterday

    Sigrid,

    1 Button has 5 webservice calls and 2 rules both being custom javascript.

    When you step through in the console on button click the 2 rules are never invoked. No errors.

    I showed this on Friday to one of Precisely case managers who suggested I open a ticket because the setup appeared to be correct to them also.

    I will post the results/fixes once we identify one.

    Thanks

    Stapuff



    ------------------------------
    Kurt Marshman
    Old World Industries, LLC
    ------------------------------



  • 8.  RE: Custom Button does not kick off Custom Rules

    Posted 14 hours ago

    Hi Kurt,

    From the Evolve documentation I have learned the same as Sigrid mentions, to put the webservice command as last step. To avoid issues I have put the next webservice command excuted by a rule in the logfield of the previous webservice (field change) and I experiene no issues with executing webservices. It might extend the execution time, but this is the way I was educated. I'm curious to improve here too.



    ------------------------------
    Ronald Vlasveld
    Master data specialist
    Industrie- en Handelsonderneming Vreugdenhil B.V.
    ------------------------------