how to display the list of items in the SO line based on dimension selected in header

sulav.thapaliya@agile.com.np
Member Posts: 8
I have created global dimension 1 code which have dimension values that represents the products that are sold by the company.All the items have been already assigned with their corresponding default dimension value code which represents their product group.Now when a sales order is created,firstly the product code is selected which is a global dimension 1 code in a header.Now,When I select the item type and use dropdown to select the item in No. field.There should only be the list of the products that belongs to that product code.For e.g;-
if there are two values of the product code dimension like 'Laptop' and 'Mobile'.
So,When I select as Laptop in the sales order header,the line item should display only the list of laptops that are present in the item list.
Now,How can I solve this requirement?
if there are two values of the product code dimension like 'Laptop' and 'Mobile'.
So,When I select as Laptop in the sales order header,the line item should display only the list of laptops that are present in the item list.
Now,How can I solve this requirement?
0
Answers
-
Hi,
My number one suggestion is to write code in the Page 46: No. - OnLookup trigger.
Good luck.\\The truth exists in seven versions.0 -
Wrote the code in No.-OnLookUp() but it didnt work.So,I placed the code in the sales line table in No.-OnLookUp(),it kinda worked but when I select the item it did not select the item value.Here's the code I wrote:-
IF Type = Type::Item THEN BEGIN
SalesHeader.SETRANGE("No.","Document No.");
IF SalesHeader.FINDFIRST THEN BEGIN
recItem.SETRANGE("Global Dimension 1 Code",SalesHeader."Shortcut Dimension 1 Code");
IF recItem.FINDSET THEN BEGIN
ItemList.SETRECORD(recItem);
ItemList.SETTABLEVIEW(recItem);
ItemList.LOOKUPMODE(TRUE);
IF ItemList.RUNMODAL = ACTION::LookupOK THEN
ItemList.GETRECORD(recItem);
END;
END;
END;
CLEAR(ItemList);
0 -
Hi,
I miss one line of code to store the selected value, something like:
"Sales Line"."No." := recItem."No.";
Good luck
\\The truth exists in seven versions.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