Hello all,
I created a table that I run 'DELETEALL' to in the OnPreReport section of a report to delete the table records. The user who will be running the report gets the 'cannot delete' error since they have the 'SUPER (W/O DBDEL)' role and cannot delete table data.
What is the best way to get around this? (I tried the report Permissions but that did not seem to fix the error) Thanks for any help.
0
Answers
Why delete all the records?
Would a temporary table be of use?
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The table I am using I created, so it is not a standard table. I used the table to resort the data before an export to excel. I created the table to include a variable calculated in the report in the primary key for sorting purposes.
I was having issues trying to figure out the xlrange to sort and wanted to just use the excel buffer alone.
I'm open to using a temporary table if it provides the same result.
Sound like the perfect example for a temporary table. Just set the property on the record variable and you should be sorted.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
and before you delete all datas. What is, if a other user runs this programm while user A runs it ;-) User B delete the datas of user A.
So, use this table as temporary table (property temporary in the variabledeclaration)
garak: I took your advice (property temporary in the variable declaration) and everything worked like a charm. In regards to the concern of user B deleting user A, this will be run 1x per day by one user.
Very cool!