Transfering field from line to header
DP_JoeyT
Member Posts: 3
Hi all,
We have a customer migrating from 2009 to 2018, and they have requested for the Sales Order / Transfer Order no. to be visible in the lists of the Warehouse Receipts/ Warehouse Shipments pages.
As the Warehouse line tables have the source no. fields, we are currently referencing them in a subscriber event onafterinsert in the warehouse tables.
This is the code used:
(Receipt)
(Shipment):
The one for the Warehouse Shipment table is working, however, the one for the Receipt header is still blank on the list and page, even though debugging shows that the field is populated when the event is run.
Please kindly advice on why this might be happening.
Thank you very much!
Joey.
We have a customer migrating from 2009 to 2018, and they have requested for the Sales Order / Transfer Order no. to be visible in the lists of the Warehouse Receipts/ Warehouse Shipments pages.
As the Warehouse line tables have the source no. fields, we are currently referencing them in a subscriber event onafterinsert in the warehouse tables.
This is the code used:
(Receipt)
IF Rec.ISTEMPORARY THEN
EXIT;
//WhseRepHdr.RESET;
//vRec.RESET;
WhseRepHdr.SETRANGE("No.", Rec."No.");
IF WhseRepHdr.FINDFIRST THEN BEGIN
IF WhseRepHdr."Source No." = '' THEN BEGIN
WhseRepHdr."Source No." := Rec."Source No.";
WhseRepHdr.MODIFY;
END;
END;
(Shipment):
IF Rec.ISTEMPORARY THEN
EXIT;
WhseShipHdr.RESET;
vRec.RESET;
WhseShipHdr.SETRANGE("No.", Rec."No.");
IF WhseShipHdr.FINDFIRST THEN BEGIN
IF WhseShipHdr."Source No." = '' THEN BEGIN
vRec.SETRANGE("No.", WhseShipHdr."No.");
IF vRec.FINDFIRST THEN BEGIN
WhseShipHdr."Source No." := vRec."Source No.";
WhseShipHdr.MODIFY;
END;
END;
END;
The one for the Warehouse Shipment table is working, however, the one for the Receipt header is still blank on the list and page, even though debugging shows that the field is populated when the event is run.
Please kindly advice on why this might be happening.
Thank you very much!
Joey.
0
Best Answer
-
Hi, why don't you just flow field that value if you just need to dispay it?5
Answers
-
Hi, why don't you just flow field that value if you just need to dispay it?5
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions