Any Interest in a Coding Camp Type Thread?

Yes! Get folks using functions! I just got my first functions working and it really opens up a lot of doors.
Here are some other ideas I had while reading this thread:

  1. I would like to see third party API integration and would offer my example as a case study. Timeclock Integration - Asure API

  2. I would also like to see more integration examples between API and functions.

  3. Lots of folks know how to make a BAQ and a UBAQ, and also how to make the BPM with a custom action inside that BAQ. What I recently learned is that there are other methods to program for besides CustomAction. in the integration above, I used the GetList method in my UBAQ/BPM. I would like to know when and how to use the other methods available. Kevin knew right away to tap into that GetList method for my particular case. How did he come to that conclusion?

  4. You cant sort there… When can you use sort by in a BAQ? When you can’t sort because of the rules in the BAQ, how do you get around it and still sort the results in the way you need? I know you can only sort the top level query, but there are tricks to getting your sort working even if it is in a subquery. (Having flag?)

  5. Variable variable types. Various variables have various ways to call them. Recently, I had to declare a bunch of variables inside my custom code block with a question mark (I think this make it nullable?). Normally, epicor is not very picky about these, but using a function and/or third-party APIs may make these variable declarations a bit more needy.

  6. Using a UBAQ without updating any tables. I often have to use UBAQs to perform some specific task. Falling back to my integration with Asure from above, that UBAQ doesn’t update any tables. I only use the updateable part of the BAQ to update a flag in the BAQ results to show the record has been processed and to allow the BPM to move to the next record. I do this in combination with the FirstOrDefault() records from the results set, that way I always have the next record. I have seen other folks do things this way too, but I can’t help but feel like it is a hack. When is it right to use a UBAQ?

  7. Usings? We often overlook the libraries that are needed to make a specific chunk of code work. Sometimes the error message can point to the right library to include, but when we can’t figure it out, what is the best way to learn which resource to include in the “Usings…”?

  8. Pro tips in BPM Designer. Working with widgets has been nice. It provides an easy way to see where the flow of the program is going. To that end I have a handful of tips and tricks that I use when creating or editing BPMs. As an example: if a looping BPM will not execute, and the error is not present, or not descriptive enough, then you need to break your BPM. Normally I would do this with code breaks, but we can’t do that here. Instead, once you identify the widget that you expect is the issue, remove the last arrow pointing to it, and point to a messagebox widget instead. Output all your relevant variables and table values to figure out where you messed up. then once you figure it out, reconnect your original widget, and hold that messagebox widget to the side to use later. BPMs wont complete or give you an error if one of the widgets fails. So, remove the failing widget and put in a messagebox temporarily to help debugging. I use this all the time!

  9. Custom Code Events. How do you setup custom events in a customization? I know I have made a custom event for .Leave. I had to add the code to the InitializeCustomCode and DestroyCustomCode parts of my customization script. Let’s learn more about custom events.

  10. Kinetic… ugghh… I guess we have to forget everything we know when moving to kinetic. So how do we do all the stuff listed in 1-9 in kinetic instead?

3 Likes