Sales Line updated accordingly when new location code is pic

liizz
Member Posts: 125
Hi all,
I have created a new Sales Return Order for a particular Sell-To-Customer No. and I have done Functions->Get Posted Document Lines to Reverse.
On the Sales Header part, I have picked up a location code(BLUE) but I want to update the Sales Lines accordingly without doing it manually. Is there a way to bypass the standard logic of the code?
Please help.
Thanks
Liizz
I have created a new Sales Return Order for a particular Sell-To-Customer No. and I have done Functions->Get Posted Document Lines to Reverse.
On the Sales Header part, I have picked up a location code(BLUE) but I want to update the Sales Lines accordingly without doing it manually. Is there a way to bypass the standard logic of the code?
Please help.
Thanks
Liizz
0
Comments
-
When you use Get Posted Document Lines to reserve function, it will update sales return order lines location code with posted order location code only..not the header location code..which is correct as per busuiness scenario..
How can you return from blue location when it is posted from red location?0 -
Thanks Mohana
But if I have changed the location code to GREEN on the Sales Header.
I will get this warning message:
You have changed Location Code on the sales header, but it has not been changed on the existing sales lines. You must update the existing sales lines manually. Lets say for an item where location is BLUE
I do not want to go through this warning message and update it manually but want it to populate directly the location code that has been selected on the Sales Header.
Is it possible to do so?
Thanks
Liizz0 -
You have to very clear on the effect of this change..
You have to write below code in Tabel 36 Location Code - OnValidate() triggerIF ("Location Code" <> xRec."Location Code") THEN BEGIN SalesLine.RESET; SalesLine.SETRANGE("Document Type","Document Type"); SalesLine.SETRANGE("Document No.","No."); IF SalesLine.FINDSET THEN REPEAT IF SalesLine.Type <> SalesLine.Type::"" THEN BEGIN SalesLine.VALIDATE("Location Code","Location Code"); SalesLine.MODIFY(TRUE); END; UNTIL SalesLine.NEXT=0; END;
Comment out below code in same triggerIF ("Location Code" <> xRec."Location Code") AND (xRec."Sell-to Customer No." = "Sell-to Customer No.") THEN MessageIfSalesLinesExist(FIELDCAPTION("Location Code"));
0 -
Thanks Mohana.
Is it a good practice to do so? Bypass the standard logic.
Thanks
Liizz0 -
liizz wrote:Is it a good practice to do so? Bypass the standard logic.mohana_cse06 wrote:You have to very clear on the effect of this change..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