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)

Automatic Distribute Amount in Purchase Requisition Line

(0) ShareShare
ReportReport
Posted on by 2,426

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

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    297,611 Super User 2025 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
    2,426 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
    2,426 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
    2,426 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
    2,426 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

Responsible AI policies

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

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans