I’ve built the example from the help but no luck in getting it to work beyond I get back the name of the library and its description. Using Postman to call it. I can change the description on the library and that updates. I also built a function that returns a hard coded string and does nothing else same result.
Any suggestions on where to look? Thanks much in advance.
The OrderSum function is from the Epicor help on functions,Widget Function . It takes a customer number, sums the total value of orders and returns it via a decimal return. If it finds nothing it should return zero. Response is populated using a set argument widget from the workflow designer.
The other function is a custom code function has a response parameter of myName, String.
The only code in the function is
this.myName = “Good-Bye”; // tried it with and without “this.”
I run into a different issue. I created an echo library that sets the outparm = inparm; The second parm returns a value from the call context and the third is a fixed string. So I’m able to set those in code.
@Jkinneman, try one more thing. Instead of free-text, right-mouse click and insert the parameter that way. The first time I just typed it, it didn’t take it. After I inserted it via the context menu, then it recognized it. And it did so every time after that too.
Yesterday I did my first official “complicated” function with 4 inputs (two dates, one integer, one string) and one output (a date). This function calculates something similar to Microsoft Excel’s Weekday function where you give it a date and days, and a holiday schedule, and it calculates a new date.
I called the function from a BPM, pushing the Starting date, “Not before” date, Days, and referenced an Epicor Holiday calendar. Amazingly, it worked, and returned the date I was expecting. Now, I need to extend and make more functions for the library that are date related.
I think I found my issue. In Postman I was sending it with a “GET” when I should have been sending it with a “POST”. Now I get a permission error so at least I am making progress. This is a cloud install.