web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

delete record from purchasing policy

(0) ShareShare
ReportReport
Posted on by 1,307

Hi,

in the process of creating purchasing policies, a policy was wrongly typed and I want to delete the policy

from <company>/Procurement and sourcing/Setup/Policies/Purchasing policies

Since its a wrongly set policy, I want the record get totally deleted rather than just "Retire Policy".

Please guide me.

Thanks,

Lakshmi

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohsin Khalid Profile Picture
    501 on at
    RE: delete record from purchasing policy

    Hi Lakshmi for some reason MS does not provide a delete option for a policy, question is how does it effect you if you leave it as a retired policy? Even the delete method has been overridden to retire the policy instead of deletion.

    However If you created a test record and want to get rid of it then use the below code in a n AX job to delete the policy.

    static void deletePolicy(Args _args)
    {
        SysPolicy policy;
        
        ttsBegin;
        select forupdate policy where policy.Name == "test";
        policy.doDelete();
        ttsCommit;
    }


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
howalker Profile Picture

howalker 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans