Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Automatic Distribute Amount in Purchase Requisition Line

(0) ShareShare
ReportReport
Posted on by 2,420

Good Morning,

I just want to ask how to distribute the amounts automatically in the PR line, without need to press Reset button.
my case is when I create RFQ from PR and accept this RFQ with the prices, the accepted prices in RFQ the prices are retrieved automatically , the issue here when I press approve on the PR to approve it.
the system gives me a message that "this action can only be completed after the line number 1 is fully distributed"
so I should to press financial > distribute amount > reset button

I want to distribute the amounts automatically without press Reset button.

Please suggest me

Any help would be greatly appreciated.

Please find the below screenshots

4774.Error1.png

6740.Error2.png

0564.Error3.png

4278.Error4.png

This amount was given while RFQ Enter Reply

Regards.

Any help would be greatly Appreciated.

*This post is locked for comments

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,711 Super User 2024 Season 2 on at
    RE: Automatic Distribute Amount in Purchase Requisition Line

    Hi AX 2012 R3,

    Opening a menu item will not solve your question to have the amounts distributed automatically. His proposal is to open the Account distributions form automatically. Then you still have to click the Reset button.

    I do agree with Crispin that the functional way is recommended. How many times per day do you have to reset it manually?

    If it is really cumbersome and you want to automate it, the actual coding is started in the method resetDistributionClicked within the class AccountingDistributionFormView. This class is a form extension which manages all kinds of behavior.

    Just calling the method in this class is not possible as the class uses some buffers. It would require some investigation how to do this using x++ coding. You can learn which calls are required from the method. Then also try to see which buffers and variables you need to be able to make your own coding.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Automatic Distribute Amount in Purchase Requisition Line

    Hi Crispin,

    Hope you are fine.

    The Warning it is showing is coming from PurchReqLine table -- IsFullyDistributed()

    Please find the below screenshot

    6835.NewERR.png

    Can i do any thing here..like calling menuitem.

    Please suggest me.

    Please provide any Help.

    Regards.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Automatic Distribute Amount in Purchase Requisition Line

    Hi crispin,
    I have written in write() method.
    Please find the below screenshots

    4113.Change2.png

    4113.Change2.png

    It is not working.

    Please provide me any code snippet.

    Regards.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Automatic Distribute Amount in Purchase Requisition Line

    Hi Crispin,

    I have done already one modification for not updating RFQ Description

    I am thinking of writing code in the same Method

    Tables --> purchreqline --> initFromPurchRFQLine()

    How  can i call menuitem here in Table method

    AccountingDistribution Menuitem is Display MenuItem

    // Edited for Accounting Distribution

    Args     args = new Args();

    MenuFunction   menufunction;

    menuFunction = new MenuFunction(menuItemDisplayStr(AccountingDistPurchReqTable), MenuItemType::Display);

    menufunction.run();

    How can i send argument To that menuitem

    Please provide me any help.

    am i doing correct way or please suggest me right way

    Regards.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Automatic Distribute Amount in Purchase Requisition Line

    Hi Crispin,

    Thanks for your reply.

    I will try and get back to you.

    Thanks

    Have a good day.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans