Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

Posted on by Microsoft Employee

Hello everyone,

I need absolutely to put in place a package tracking No. So Ihave created my fields on T7320 and T7322(and pages associated), but I don't know how to populate the field from T7320 to T7322.

Does anyone could help me?

Thanks in advance.

*This post is locked for comments

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    It was working fine even with partial shipment at my end.

    Please check again.

    where did you write code?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Thanks for your reply, Mohana.

    It seems almost working, execpt that with partial shipment, I get the previous number in my Package tracking No( like xrec instead rec!).Do you have one idea?

  • Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Sorry, Updated the previous post.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Hi Mohana,

    Is it me, or your existing code and new code are the same?  :-)

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Please test all scenarios with multiple documents with partial posting and etc.

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Search for // Insert shipment header text in Codeunit 80

    Existing Code

       IF WhseShip THEN BEGIN

           WhseShptHeader.GET(TempWhseShptHeader."No.");

           WhsePostShpt.CreatePostedShptHeader(

             PostedWhseShptHeader,WhseShptHeader,"Shipping No.","Posting Date");

         END;

    New Code

         IF WhseShip THEN BEGIN

           WhseShptHeader.GET(TempWhseShptHeader."No.");

           SalesShptHeader."Post test" := WhseShptHeader."Post Test";

           SalesShptHeader.MODIFY;

           WhsePostShpt.CreatePostedShptHeader(

             PostedWhseShptHeader,WhseShptHeader,"Shipping No.","Posting Date");

         END;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Thanks Mahona, it was working fine.

    Now, I would like to populate the package tracking to T110. But I don't find any field relation between T7322 and T110 to do a lookup. Lookup Or may be directly by the code?

  • TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    You can use the option Mohana given. 

    Create the field in the T7320 and T7322 and in the codeunit 5763 (Whse.-Post Shipment) you can write your code in the CreatePostedShptHeader() function right after the 

    PostedWhseShptHeader."External Document No." := WhseShptHeader."External Document No.";

    Before the Insert statement you need to put your coding.

     PostedWhseShptHeader."Your Field 01" := WhseShptHeader."Your Field 01";


    This should work properly. 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    Hi Jonathan,

    Thanks for your reply. Unfortunately, I have tried before to post my inquiry on this site with a lookup field, but it was not working.

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: How to populate a new field(package tracking No) from T7320(warehouse shipment header) to T7322(posted warehouse shipment header)?

    You need to add code in Codeunit 5763 - Whse.-Post Shipment under CreatePostedShptHeader function something like

    PostedWhseShptHeader."New Filed" := WhseShptHeader."New Filed";

    before

    PostedWhseShptHeader.INSERT;

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans