@Chris_Conn@knash Thank you both for taking the time to troubleshoot with me!
I made sure the RowMod was set to “A”, it’s still not filling the table with anything though. Here are some screenshots, I’m not sure where I’m going wrong:
@knash A few questions - my apologies, just trying to learn from this for future reference!
Would the GET be placed before or after the FILL TABLE that I have (or replace it)?
Is there a reason why I would use UPDATE (like you have) versus UPDATEEXT that I currently have?
Is there a way I can insert a widget between two widgets in the Designer? I’m not seeing a way to do that, or to remove widgets once they’re added, which seems like rudimentary stuff that I must be blind to, ha!
Correct GetaNew would be first. Sorry I thought you could read my brainwaves from the picture I posted yesterday.
You should be able to add widgets to what you have. If you click on the connector lines you can delete them. Then you can redraw them in the order you want.
Widgets
GetaNewUD08 (The picture show what the widget is calling)
BO Ice.UD08
Method Name: GetaNewUD08
for the parameter you can the one you have or create a new one.
2)FIll Table
Update
I believe the UpdateExt is deprecated, smarter folks can chime in.
@knash Oh, I think you’ve got me so close to a solution! Now I believe I’ve run into a different issue - when testing the BPM by changing a sales order and clicking save, I’m getting an error that the record is already in the UD08 table. I’m assuming this is because the Key I assigned isn’t actually unique. I’ve got it set up to be a combination of the Order Num + Order Line + Price + Qty + Date, so I’m not sure why it wouldn’t be considered unique whenever a sales order is updated, since one of those values (price, qty, or date) would always be changed.
Is there a way to assign an auto-generated unique key to every single new save in a sales order?
@knash I may be far over my head with this one… I tried my best to review the PDF and the C# code included in it, but I am honestly at a complete loss on how to change up the BPM and code to apply to my situation (setting a field in a UD table) versus the example use case of applying it to an ERP field.
What’s got me confused is that I’m getting the Duplicate Row Error, but there’s only one row in the UD table and all of the fields are empty.
@knash@Chris_Conn These both seem like great solutions! I tried to test Chris’ solution first with using the SysRowID as Key1, but I’m running into a separate issue. To test it, I go to the Order Entry module and change the selling quantity, then click save (which should add the record to the field). Then I pull up my UD table in a BAQ, which shows that a record has been added, but all fields are completely blank. Then I go back to the same sales order and change something else on it, but this is where I get the Duplicate Row Error and am unable to save any additional changes to the sales order.
I think my issue may be happening due to binding… should the tt fields be empty? Or should I be using ds fields instead?
The sysrowid might not work as you may have multiple updates on the same record you are monitoring.
try the SysRevID.
What is your query for the fill table? You can hardcode a few to test. Then once you know the creation is working we can focus on getting the real data filling in.
Variable is now “NewUD08” and set to UD08Tableset.
Both GetaNew and Update reference the NewUD08 variable.
Fill widget is set with the query and mapping in my previous screenshots.
@knash Ah, I’m so sorry! Thank you for being so incredibly patient with me. Our IT guy uses me for writing SSRS reports and BAQs, and he’s now slowly getting me into adding custom fields, user codes, and now BPMs. I’m loving what I’m learning, but it’s a lot of trial and error and “d’oh” moments! I also only just started a course on SQL, and seeing this C# coding is definitely muddying my brain, ha.
OrderNum is the relation between OrderHed/OrderDtl, and OrderNum and OrderLine are the relations between OrderDtl/OrderRel (and obviously Company is used for both relations as well).
@knash I’m still trying your solution out, but just curious - why would I choose the Update Table (vertical) instead of the Fill Table (horizontal), when what I want to accomplish is adding new records to the table each time an order is changed?