Can i delete records in an updatable dashboard?

I have an E10 Updatable dashboard that I would like to use to maintain a UD100 table.

I have been able to load the table with the data - however I now would like to clean up some records and delete them.

Am I missing something?

Thanks,
DaveO

No your not missing something, it’s not possible to delete records directly from an updateable dashboard.

A way that I found that worked was to add a checkbox to the dashboard called ‘Delete Row’

image

and then modify the update directive, using the following logic where the custom code deletes the row

3 Likes

You can delete records. You’ll just have to write your own base handling for the update method of the UBAQ.

There are many ways to approach it, one way is to add a calc column bool field that represents DeleteMe (similar to what Andrew describes above). In your handler, for all rows marked DeleteMe, grab the sysrow, then delete them as needed (preferably through a BO if its not just a simple ud table)

2 Likes

:+1:for that solution

But my OCD requires giving you a :-1:for that erratic layout.

DRAG THAT DELET ROW WIDGET TO THE LEFT OF THE CONDITION WIDGET!!! :wink:

2 Likes

Mr. Andrew: Would you be willing to share the Delete Row code?

I am working with a UD104 so it is not a system table.

Thanks,
DaveO

Check out the code on deletion.

I wrote this in my very early days of Epicor and I’m prety sure I used TobyLai’s link as the basis for my code.

In terms of identifying the row to delete, you need to use the ttResults table.

You don’t need to have a C# block to delete either. You can call a BO with a widget and set the parameters there. Like @aclements said, use the TT rows to identify them.

If it helps anyone, don’t test your BAQ directly. Row modifications are much easier to manage through a dashboard than the BAQ editor and you can do everything inline in the Dashboard. Adding a checkbox and using it to conditionally set RowMod to “D” is best done in a modified base BPM in the Update method for the UBAQ if you’re updating a UD table for example, your UDXX object that gets passed to the Update() method just add a condition just before update and add UDXX.RowMod = “D” . you need to also add a condition in the code that avoids writing back to the UDXX TTResult following. Otherwise you’ll get “row doesn’t exist” errors.