Before anyone panics, I am not planning on deleting ANYTHING from a core Acumatica table! :-)
I’ve read this post but it involved deleting in a “one-time” fashion using export scenarios. I don’t think that is an option for my use case.
My requirement to to create a SQL View that can pull data using a GI. Got that under control. The issue for me is that it is not possible (AFAIK) to create a View in SQL to pull the data and de-normalize it without using a loop in SQL, which is not allowed in a SQL View.
My plan is to create a custom screen that can use C# in an Acumatica customization to process the data and store it in a custom SQL table. When a user uses the custom screen to pull data into the table, I want to delete EVERYTHING from that table that was put in there previously by that user. Otherwise this table will grow very large for no useful purpose.
I know I can pull a record set and cycle through it and delete rows one at a time. Is there an option in Acumatica I have not found to allow you to do a delete from a table for multiple records? (delete joetable where UserID = ‘joeuser’)
I could do it easily with a stored procedure but I think that’s a big no-no in Acumatica (or if it is actually possible...I recall reading a post where someone wanted to execute a sproc and they were told never to try doing that.
Thanks,
Joe