Admittedly not a C# programmer, but other languages like SQL etc.
Everything I find on here and enter even the most basic command fails in the C# editor syntax.
Could it be because we are Cloud Based Kinetic 2023.1?
I am trying to do a field comparison on two different tables in the BPM Method “Erp.BO.PO.ChangeDetailPartNum” which fires when you enter a new Part Number on a PO Line. (I have verified this is the correct Method via Tracing and testing)
Maybe even the wrong place to do this?
I want to compare the Numeric field Vendor_UD.QAClassNum_c to the Part.UserInteger2 field to see if they match for the dsPODetailRow.PartNum field when it is entered, then I can take action from there.
I believe the correct “Condition” to use is: ‘The custom code condition is valid’ and enter some C# code there OR ‘The specified expression is valid’, both of which allow C# code.
The Expression Editor does not have the tables for Vendor or Part in the list, but I am sure you can check fields in other tables as I have seen here via a SELECT statement much like SQL.
Anything I put in Expression Editor, even from code examples in this forum fail. Do we need curly braces in this editor? all regular C# commands seem to fail as well.
Using the fields within the Epression Editor also fail, as an example: int partqa dsPODetailRow.PartNum;
Fails with “Expression should contain only one statement”. No matter how I change things, still errors out.
Would love to see an example of code from someone on Cloud that I could glean some syntax from.
Even just how to assign a variable to a field would be helpful.
You should be able to do this without custom code, by using the condition widget with the “number of rows in the designed query is more or equal to 1”. Build the query, link to the part table and the vendor table and have a condition in the query where Vendor.QAClassNum = Part.UserInteger2. If they’re equal, it will return one row and the condition will be true. If they’re not equal, then it will return zero rows and the condition will be false.
Seems using ‘Synchronously Execute Custom Code’ action, I see where I can add the Variable names and type. Still need to link them or populate from Vendor_UD and Part Tables. working on it…
On that method, the “Number of rows in the Designed query is more or equal to 1” is not available as a choice condition. That is why I was using the “The specified expression is valid” or “The custom code condition is valid” conditions on the Condition widget. If I could do it with a BAQ that would be great as well. Still poking around…
Kinetic…
Yes, I opened it in Classic and that choice is there…ughhh
Thanks for the screenshot, it tipped me that you are using the Classic shell, and I was using Kinetic.
I will continue testing…
Typical of most software companies. When they come out with new technology, like the Kinetic UX, it’s very bleeding edge and buggy. In my opinion, Epicor focuses on the user forms (job entry, shipment entry, etc) before they spend as much time on the IT functions (report styles, directives, etc). That’s a good move on their end. The user facing forms are getting much better, still some issues but they’ve come a long way.
Hopefully the system admin forms won’t be too far behind. For now, I run a lot of those types of programs in classic view.
All good and working now. “Poor Man’s” vendor rating system.
BPM and Query work fine, but will continue exploring C# and programming things going forward.
Appreciate all comments and help.
George