Trying to create a button script to delete records. Specifically, Bill Option Header & Bill Option Detail records for an entire Bill # & Bill Option Category. This is running on Advanced, so I believe that is creating some issues as well.
We have come at this from 2 different angles; neither are working.
We tried one method (Lwa_Deletebomoptiondetail.vbs) where we prompt the user for the data, open a connection, run a SQL statement, & then run delete. However, I feel like this is mixing methods & not sure if it works together or not. We tried a bunch & then commented a bunch out, etc.
I tried placing it on the Bill Maintenance Header panel & it does nothing; I am assuming because it is not the current oBusObj. I then placed it on the Bill Option Header panel & we can get it to sometimes work & sometimes clear all records for that Bill, regardless of the Bill Option Category. I believe it is because we are trying to delete a record using oBusObj & it doesn't like to delete itself??
I tried going another way (Lwa_Bm_Delete_Billoptions.vbs), but I always get an oSession error & don't know why. Another issue is this is MAS200, so I don't think I can use those input boxes, correct? So, if I run it from Client, I get the error, but if I run it from Server, I get the input box errors. If I place the button on the Bill Option Header panel, I can bring in the fields I need so I don't need to prompt the user, but then I am back to the current oBusObj issue, I think.
Which way should we be headed?? Or are we completely out in left field?