Method Directive Condition to Check for No "CodeBehind"

Hello!
I’m working on creating a BPM that tracks Dashboard usage. I’ve searched for several threads, but I can’t find exactly what I’m looking for. I know Epicor has a Usage Tool, but I also wanting to get more knowledge on BPMs and C# code.

I’m trying to write a Post Method Directive on the Ice.BO.Dashboard.GetDashboardVersionInTenant BO. I added a UD table as a variable and I’m trying to write a condition that looks for “NoCode” or something similar (I could be on the wrong path). With the screen shot below, which condition would let me do that and how would I write it? I’ve used conditions in the past, but I can’t see to figure out how to pass the condition to the execute statement.

When the statement is false, I want the BPM to:

  1. Execute some custom code to identify the Module Name
  2. Get the UD table
  3. Update the UD table with Dashboard name, User, and date accessed
  4. Save the UD Row

Any input would be great! If there’s an easier way, I’m open to listen.

You’re just looking for a specific string in a table? Use the “Number of row in the designed query…” one. Then query the table you are looking for.

Building off what @Banderson said, this should get you there:

Query on XXXDef
Conditions:
TypeCode = “Customization”
AND ( Key2 MATCHES “.” + @definitionID + “.”
OR Key3 MATCHES “.” + @definitionID + “.” )

Now that’s just going to tell you whether that dashboard has a client customization on it.

Hey @klincecum, thanks for adding on to @Banderson’s initial comment.

When I went to add your condition, I saved the Designer, enabled the BPM, saved the BPM and got the following error.

I also went back and though about why I needed the condition, so I removed it and went straight for the custom code and got greeted with another error when I tried to pull up a Dashboard.

Any insight to why this is happening? Why I need a condition?

That picture looks like it has fancy quotes “” in it instead of regular quotes. Type them in instead of copying from the post.

@klincecum and @Banderson thank your for your help. You guys are rockstart!

@klincecum. That did the trick. After I got that portion working the rest of the BPM did it’s Job. The BPM now stores the UserID, Module, DateTime in a UDTable.

1 Like