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

  • Community Member Profile Picture
    on at
    RE: Mandatory dimension fields when making post out of a purchase quote

    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.

  • Verified answer
    Suresh Kulla Profile Picture
    45,341 on at
    RE: Mandatory dimension fields when making post out of a purchase quote

    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
    RE: Mandatory dimension fields when making post out of a purchase quote

    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.

  • Suggested answer
    Suresh Kulla Profile Picture
    45,341 on at
    RE: Mandatory dimension fields when making post out of a purchase quote

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

    PurchPost.CheckDim(Rec);

  • Community Member Profile Picture
    on at
    RE: Mandatory dimension fields when making post out of a purchase quote

    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
    45,341 on at
    RE: Mandatory dimension fields when making post out of a purchase quote

    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,041 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,860 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans