In the process of an upgrade from E9 to Kinetic. There is a screen that utilizes an Updateable BAQ Directive that has ABL code. I have converted several BPM’s that have ABL code to C# but this has a different look to it.
Code:
All this code does is create a temporary dataset (tableset) filled with values from your ttResults of your BAQ, then runs an UpdateExt call against them. After running the update, it checks if errors were output, then processes those rows into another error temp table to be copied to the BOUpdError letting the UI know these rows didn’t make it.
In Kinetic, you would likely use the UD13 tableset and the UD13Svc.
Thank you this is a great start. When I replaced the code with this I received the following errors:
System.Drawing.Bitmap CS0246 The type or namespace name ‘UD13SvcContract’ could not be found (are you missing a using directive or an assembly reference?)
System.Drawing.Bitmap CS0246 The type or namespace name ‘UD13Tableset’ could not be found (are you missing a using directive or an assembly reference?)
System.Drawing.Bitmap CS0103 The name ‘ttResults’ does not exist in the current context
System.Drawing.Bitmap CS0246 The type or namespace name ‘UD13Row’ could not be found (are you missing a using directive or an assembly reference?)
System.Drawing.Bitmap CS0103 The name ‘ud13row’ does not exist in the current context
System.Drawing.Bitmap CS0103 The name ‘tsUpdInvoice’ does not exist in the current context
System.Drawing.Bitmap CS0103 The name ‘boUpdErrorDataSet’ does not exist in the current context
I did try to change the ud13row to UD13Row didn’t seem to make a difference.
The first few errors seem to be because you’re missing a using clause. If you’re doing this in uBAQ Directives Maintenance, there’s a option in the custom code editor to add usings & references.
The one about ttResults is based on the BAQ Results table it’s using. That’s what was used in the original script you posted, so that’s what I used. If you right click in the code editor there should be a table name in the parameters menu.
The rest are because I changed some of the variables to make it easier to read, but didn’t change them everywhere. That’s my bad.
Okay I was able to fix a lot of those error doing what you suggested. The only parameter that I can use when I right click is “queryResultDataset” and it doesn’t like that one with the where clause. Thank you again! Down to these three errors:
System.Drawing.Bitmap
CS1061
‘QueryResultDataSetUbaqTableset’ does not contain a definition for ‘Where’ and no accessible extension method ‘Where’ accepting a first argument of type ‘QueryResultDataSetUbaqTableset’ could be found (are you missing a using directive or an assembly reference?)
System.Drawing.Bitmap
CS0103
The name ‘tsUpdInvoice’ does not exist in the current context
System.Drawing.Bitmap
CS0103
The name ‘boUpdErrorDataSet’ does not exist in the current context
I see, they changed it in Kinetic. Use queryResultDataset.Results instead of ttResults. The script below should clear the errors. Can’t promise it will work, but it should clear the errors.
No problem! You’ve been a life saver on this! I just have to find the Using & References for the UpdExtUD13Tableset now and hopefully it works! Thank You!
If you have any ides on which Assembly is needed let me know.
I had already added Ice.Contracts.BO.UD13 which solved the errors from earlier but not for the last section you corrected. I’m still scrolling through looking for one that would make sense to use.
Yes I changed that line to that then the error came up: System.Drawing.Bitmap CS0246 The type or namespace name ‘UD13UpdExtTableset’ could not be found (are you missing a using directive or an assembly reference?)
So I started to look for an assembly that would work for it.