Question Status

Suggested Answer
KBanh asked a question on 7 Jun 2013 9:05 AM

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!

Reply
Suggested Answer
André Arnaud de Calavon responded on 7 Jun 2013 11:31 AM

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.

kind regards,

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.

Reply
PrzemekG responded on 12 Jul 2013 1:49 AM

Hi!

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.

Regards,

PG

Reply
Kyle S LeBarre responded on 12 Jul 2013 1:14 PM

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.

Reply
Mernoosh responded on 29 Jun 2014 6:55 AM

Hi,

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

Reply
Suggested Answer
André Arnaud de Calavon responded on 7 Jun 2013 11:31 AM

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.

kind regards,

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.

Reply