Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

New Field in Purchase Header

Posted on by Microsoft Employee

Hi there.

I'm wondering wether is possible to add a field, in purchase header, to post the date when the vendor invoice  was received. I mean: A vendor invoice is received at company on 5th. January with 1st. January as its own document date. Invoice is received by the person who sign his approval on 10th January. Then, the invoice goes to account department and it's posted in NAV on 13th January. We have 3 dates: Posting Date,  Document Date and Approval Date.

Is it possible to add "Approval Date" to Purchase Header to post this field or should I save it on more tables?

How could I do that?

Thank you so much.

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: New Field in Purchase Header

    I solved it creating a new field in tables 7000002 and 7000004 as Flowfield of table 122 where No. = Document No. and I got that date without any other code. ^_^

  • keoma Profile Picture
    keoma 32,675 on at
    RE: New Field in Purchase Header

    hi, if my answer also helped to find a solution please verify it too. thx.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: New Field in Purchase Header

    Thank you both. I have almost done it. This approval method is manual so I set the new field on Prch. Header and Inv. Header and I got the field in posted invoices as I wanted. However, I need that this field also appears when I run Form "7000013 Playable Closed Cartera Docs" cause our  payment periods are related to these dates.

    Regards.

  • Verified answer
    Saurabh Shah Profile Picture
    Saurabh Shah 4,560 on at
    RE: New Field in Purchase Header

    Hi ,

    Yes, It is possible. As archer said, it is require to create the Approval date field on purchase header and purch. Inv. header. Please keep the field ID same in both the tables so when you post the invoice it will automatically flow to the Purch. Inv. Header and you need not require to code for it to transfer the value to purch. inv header.

    For updating the Approval Date on purchase header. I am little confuse that you are going to put this date manually or if you are using the approval setup of NAV.

    If it is manually then it is no need to code anything and only adding the field but if it is require to transfer when user do the approval in NAV through approval setup mechanism then on event of approval then you need to write code in codeunit 439 (Approval Management) under ApproveApprovalRequest Function. in this function at the end you will find the code of

       IF PurchaseHeader.GET(ApprovalEntry."Document Type",ApprovalEntry."Document No.") THEN

         ReleasePurchaseDoc.RUN(PurchaseHeader);

    here you need to modify the code to update the Approval date in purchase header.

    Regards,

    Saurabh Shah

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: New Field in Purchase Header

    hi,

    if you mean that the approval date is a date given by the vendor, then you need a new field in purchase header and also in purchase inv. header.

    best regards

  • Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: New Field in Purchase Header

    Hi

    Yes, it is possible to add a new field in the purchase header, and you need to write the code to populate the new field for this you need developer license

    Regards

    Rajasekhar.Y

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans