Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Cancel Purchase Receipt

(0) ShareShare
ReportReport
Posted on by

Hi Guys,

I am trying to cancel a purchase order, but the system is not cancelling it. When I dig deepen then I saw that a function in PurchFormLetter Class main function : 

if (!purchFormLetter.shouldSkipPrompt() && purchFormLetter.prompt())
        {
            purchFormLetter.run();
            outputContract  = purchFormLetter.getOutputContract();
            numberOfRecords = outputContract.parmNumberOfOrdersPosted();
        }

This variable (numberofRecords) is coming as 0.

I have also checked FormletterOutputContract class where parmNumberOfOrdersPosted is called, code is as follows :

[DataMemberAttribute]
public Counter parmNumberOfOrdersPosted(Counter _numberOfOrdersPosted = numberOfOrdersPosted)
{
    numberOfOrdersPosted = _numberOfOrdersPosted;
    return numberOfOrdersPosted;
}

Can somebody kindly explain that from where this colored variable is picking the value.

*This post is locked for comments

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
Zain Mehmood Profile Picture

Zain Mehmood 6 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans