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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Mandatory dimension fields when making post out of a purchase quote

(0) ShareShare
ReportReport
Posted on by

When creating a purchase order and trying to post and invoice it, an error is thrown if the mandatory dimension is left blank.

This is not the case when a purchase quote is to be made a post.

I would like to add the functionality of not allowing a user to make a post out of a purchase quote when dimensions are left blank.

From what i have found this functionality is present in the "Purch. -Post" codeunit (ID 90) and i need to add it to

"Purch-Quote to Order" codeunit (ID 96).

Could you please show me the way to achieve this?

Thank you!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    You don't post a purchase quote, you just convert that to order and while posting it will check the dimensions.  If you need to add that during conversion then you can call the function CheckDim from the Posting Codeunit in the codeunit 96

  • Community Member Profile Picture
    on at

    Thank you for the response! Yes i need to add  that during conversion. Calling CheckDim in the OnRun of Codeunit 96 doesn't work for some reason. Conversion is proceeding without a problem. Any help is appreciated!

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Send the screenshot how you calling it, call the function before CreatePurchHeader call

    PurchPost.CheckDim(Rec);

  • Community Member Profile Picture
    on at

    7206.screen.png

    I had to change the scope of CheckDim to Global at Codeunit 90 in order to call it from codeunit 96. In debug mode it normally gets inside the function but it just gets through the 3 subfunctions inside CheckDim without throwing the error. Any ideas? 

    Thank you in advance.

  • Verified answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    It is because of the Temp Purchase Lines which are empty and while it is checking lines it uses Temp Global and also it will execute only when Qty. to Receive or Invoice is not equal to zero. I would suggest copying those functions into custom codeunit and remove that condition in CheckDimLines and also add your own function to copy to Temp.

  • Community Member Profile Picture
    on at

    Thank you for your help. I managed to do it. I used 'FillTempLines' from Codeunit 90 too as you mentioned. I completely removed the if statement in 'CheckDimLines' and everything is working.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans