Hello! I received a request recently to remove the ability to delete (via delete button) journal entries (e.g., pick list) once they're posted. Not sure if this requires coding (haven't quite jumped into that mud hole yet) or it can be configured through existing system configurations. As always, any help would be greatly appreciated!
If you are using AX2012: Create a security policy (XDS) for it. This is based on a query and a security policy. It is done from the AOT but requires no coding. See this link for more information: msdn.microsoft.com/.../hh272123.aspx.
André Arnaud de Calavon | Microsoft Dynamics AX Solution architect | My blog | My company
This post is my own opinion and does not necessarily reflect the opinion or view of my company, Microsoft, both its employees, or other MVPs.
What if I'm not using AX2012 but AX2009 and need similar solution?
User can easily delete posted picking lists (journals). How can I prevent this form happening in AX2009?
Thanks for all suggestions.
Can modify the validateDelete() method on the table to not allow the records to be deleted based off of the status.
You can also modify the form datasource's "active" method to set the datasource's "allowDelete" property based off of the status.
I'd recommend doing both so the delete button will be disabled on the form and you'll have a table level safeguard as well.
I want to do the same thing. To remove the ability to delete (via delete button) movement journal entries once they're posted.
I studied the msdn source you introduced (msdn.microsoft.com/.../hh272123.aspx) and successfully created a sample project including a security policy.
My question is, how can I include the delete button (which is a command button and I'm not sure if it could be queried) inside my project and besides the security policy?
Could you please help me with this matter?
Thanks in advance