Posted Shipment

omyvadiya
Member Posts: 124
Hi,
I have to create shipment orders from a Sales order..
Conditions:
The Sales Order can have multiple Items having multiple Charges for a single item, so on cliking Ship Sales Order. Only the first item and its respective charges must be added to the new posted shipment order.
For Eg:
Item 1
Charge -1 (For item 1)
Charge -21 (For item 1)
Item 2
Charge -1 (For item 2)
Charge -21 (For item 2)
so there are intotal 6 lines in a Sales order, on clicking Ship Sales Order, the Item 1 and its respective charges must be Shipped (a new Posted Shipment ) must be created.
What i did:
created 2 new fields in the sales line table named
Ref. Line No. & Ref. Item No.
and passed the Line no 10000 and item no. to other other 2 charge lines....
The problem is when i filter the data and try to call the Posting codeunit, it belongs to Sales Header and not to Sales Line.
RecSalesLine.RESET;
RecSalesLine.SETRANGE(RecSalesLine."Document No.",SalesOrderNo);
RecSalesLine.SETRANGE(RecSalesLine."Ref. Item No.",ItemNo);
RecSalesLine.SETRANGE(RecSalesLine."Ref. Line No.",SalesLineNo);
IF RecSalesLine.FINDSET THEN
BEGIN
CODEUNIT.RUN(CODEUNIT::"Ship-Post (Yes/No)",RecSalesLine);// The Sales Header record must be passed.
END;
How can i create a new Posted Shipment Order. Any help will be appreciated.
Thanks in Advance
I have to create shipment orders from a Sales order..
Conditions:
The Sales Order can have multiple Items having multiple Charges for a single item, so on cliking Ship Sales Order. Only the first item and its respective charges must be added to the new posted shipment order.
For Eg:
Item 1
Charge -1 (For item 1)
Charge -21 (For item 1)
Item 2
Charge -1 (For item 2)
Charge -21 (For item 2)
so there are intotal 6 lines in a Sales order, on clicking Ship Sales Order, the Item 1 and its respective charges must be Shipped (a new Posted Shipment ) must be created.
What i did:
created 2 new fields in the sales line table named
Ref. Line No. & Ref. Item No.
and passed the Line no 10000 and item no. to other other 2 charge lines....
The problem is when i filter the data and try to call the Posting codeunit, it belongs to Sales Header and not to Sales Line.
RecSalesLine.RESET;
RecSalesLine.SETRANGE(RecSalesLine."Document No.",SalesOrderNo);
RecSalesLine.SETRANGE(RecSalesLine."Ref. Item No.",ItemNo);
RecSalesLine.SETRANGE(RecSalesLine."Ref. Line No.",SalesLineNo);
IF RecSalesLine.FINDSET THEN
BEGIN
CODEUNIT.RUN(CODEUNIT::"Ship-Post (Yes/No)",RecSalesLine);// The Sales Header record must be passed.
END;
How can i create a new Posted Shipment Order. Any help will be appreciated.
Thanks in Advance
0
Comments
-
omyvadiya wrote:so there are intotal 6 lines in a Sales order, on clicking Ship Sales Order, the Item 1 and its respective charges must be Shipped (a new Posted Shipment ) must be created.0
-
it must be shipped next time when required.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions