hi all... i have a question
how to avoid user to delete the posted document?
i have an issue... i think there is a user that deleted the posted sales invoiced
and now we cannot track who did it?
is there a way ?
thanks
hi all... i have a question
how to avoid user to delete the posted document?
i have an issue... i think there is a user that deleted the posted sales invoiced
and now we cannot track who did it?
is there a way ?
thanks
hi all... i have a question
how to avoid user to delete the posted document?
i have an issue... i think there is a user that deleted the posted sales invoiced
and now we cannot track who did it?
is there a way ?
thanks
As far as I know there's only one Form for each Posted Document Type where deletion is allowed. So the effort should be nearly the same. And most customers do not have access to the Table Designer. But anyway... I think there're many roads that lead to Rome and it depends on your individual situation what's the best solution for you.
"Money is likewise the greatest chance and the greatest scourge of mankind."
This is another one of our Setup Table Additions too.
Sales & Receiveable Setup
New Boolean = "Block Deletion Of Posted Documents"
Then on Table
OnDelete()
SalesSetup.Get;
If SalesSetup."Block Deletion Of Posted Documents" then
ERROR('You are not allowed to delete Posted Documents');
That way authorized people can turn it on & off if needed without having to go back to change the code.
As far as I know there's only one Form for each Posted Document Type where deletion is allowed. So the effort should be nearly the same. And most customers do not have access to the Table Designer. But anyway... I think there're many roads that lead to Rome and it depends on your individual situation what's the best solution for you.
Yes there are many roads to Rome. The point though is that business logic should be triggered by the data, not the form that the data happens to be on. Whether you are allowed to delete a record from a certain table should not be decided by which form you are on. What will happen if certain users need to be able to delete that data anyway, more code on the form? Programming (I consider setting properties as programming) business logic in forms just makes managing the application needlessly complex.
As far as I know there's only one Form for each Posted Document Type where deletion is allowed. So the effort should be nearly the same. And most customers do not have access to the Table Designer. But anyway... I think there're many roads that lead to Rome and it depends on your individual situation what's the best solution for you.
Yes there are many roads to Rome. The point though is that business logic should be triggered by the data, not the form that the data happens to be on. Whether you are allowed to delete a record from a certain table should not be decided by which form you are on. What will happen if certain users need to be able to delete that data anyway, more code on the form? Programming (I consider setting properties as programming) business logic in forms just makes managing the application needlessly complex.
Yes, I'm totally with you. I know about the issues behind. But I can also think of situations where it is easier to go another road and someone decides that it is worth to bear the consequences of that road. That's why I said it depends on your individual situation what's the best solution for you.
"Money is likewise the greatest chance and the greatest scourge of mankind."
Answers
this one is good for me but is there any setting which prevent user delete the posted document/
remove delete access for posted tables for particular roles..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
thanks a lot
Put on the OnDelete trigger of the table:
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
thanks
This was also simple..what was the issue with this?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
but i need to set it in the table
so i dont have to set for each form/page
RIS Plus, LLC
Sales & Receiveable Setup
New Boolean = "Block Deletion Of Posted Documents"
Then on Table
OnDelete()
SalesSetup.Get;
If SalesSetup."Block Deletion Of Posted Documents" then
ERROR('You are not allowed to delete Posted Documents');
That way authorized people can turn it on & off if needed without having to go back to change the code.
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC