Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

posting sales agreement using x++

Posted on by Microsoft Employee

Hi, Is it possible and how hard would it be to to post confirmation of sales agreement (using SalesAgreementHeader instead of SalesTable)?

7077.code.png

I tried modifying this code so that it would use SalesAgreementHeader table, but nothing happened, there must be a lot of code underneath.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: posting sales agreement using x++

    Thanks! This is exactly what I have been looking for :)

  • Verified answer
    Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: posting sales agreement using x++

    Allow me to paste, some rough code of lines, written quickly. You can explore more by yourself. These are Woking to confirm a sales agreement.

    SalesAgreementHeader    SalesAgreementHeader;
        AgreementConfirm_Sales  objAgreementConfirm_Sales;
        ;
    
        SalesAgreementHeader.clear();
        SalesAgreementHeader  = SalesAgreementHeader::findAgreementId('SAG-000002');
    
        objAgreementConfirm_Sales = AgreementConfirm_Sales::construct();
        objAgreementConfirm_Sales.parmAgreementHeader(SalesAgreementHeader);
        //<Eanbale any one of folliwng two lines of code.>
            //objAgreementConfirm_Sales.prompt();//<if you want prompt for user>
            //objAgreementConfirm_Sales.startConfirm();//<if you want silent confirmation without prompt, use only this line and comment previous line of code>
        //</Eanbale any of folliwng two lines of code.>
        info('Ok');
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: posting sales agreement using x++

    Instead of SalesFormLetter or do you mean like somewhere additionally?

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: posting sales agreement using x++

    Hi,

    Try using any of following classes

    AgreementConfirm_Sales

    AgreementConfirm

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans