How to display the exact data selected through lookup form

venkatesh
Member Posts: 51
hello,
i am selecting a Non stock item from a particular vendor(same non stock item is from more than one vendors) through a lookup in sales line form(Customized funtionality).when i press 'ok',i am not able to get the exact vendor item.It is not giving the exact record what i selected.The Vendor code is not refreshed,it is same even when i select some other vendor item.
Example:
Vendor Item No Vendor Code Unit Price
13838 XXXX 5.05
13838 YYYY 6.00
when i select a vendor item from XXXX,i am getting the price and vendor code of YYYY.
please help me to solve this problem ](*,)
thanks,
regards,
venkatesh
i am selecting a Non stock item from a particular vendor(same non stock item is from more than one vendors) through a lookup in sales line form(Customized funtionality).when i press 'ok',i am not able to get the exact vendor item.It is not giving the exact record what i selected.The Vendor code is not refreshed,it is same even when i select some other vendor item.
Example:
Vendor Item No Vendor Code Unit Price
13838 XXXX 5.05
13838 YYYY 6.00
when i select a vendor item from XXXX,i am getting the price and vendor code of YYYY.
please help me to solve this problem ](*,)
thanks,
regards,
venkatesh
0
Comments
-
Hi,
actually I don't know exactly what you want to do, but perhaps this will help you:lrc_VenorItem.setrange("Item No.", '13838'); if form.runmodal(0, lrc_VenorItem) = Action::LookUpOK then begin lrc_SalesLine.validate("Vendor Code", lrc_VenorItem."Vendor Code"); ... end;
0 -
hai cog,
If i write the coding what you have given above,the existing functionality of sales line like GL Account,Item,Resource,Charge(Item) will be affected.
thanks in advance0 -
Hi venkatesh,...through a lookup in sales line form(Customized funtionality)...
There are two possibilities to integrate a Lookup-Form:
1. to use the TableRelation-Property in a field
2. to use the OnLookup CAL-Trigger of a field
And here seems to be the problem. One the one hand you have the TableRelation Property of the "No." Field in table 37. On the other hand you have integrate a CAL-code in the form. That's not a good solution...
I recommend to use the TableRelation-Property. It's quick and easy.
More complex functionality must be integrated in the OnLookup-Trigger.No. - OnLookup() CASE Type OF TYPE::"G/L Account": BEGIN lrc_GLAccount.setrange("No.", Code); IF FORM.RUNMODAL(0, lrc_GLAccount) = Action::LookUpOK THEN VALIDATE("No.", lrc_GLAccount."No."); END; TYPE::"Item": BEGIN lrc_VenorItem.setrange("Item No.", '13838'); IF FORM.RUNMODAL(0, lrc_VenorItem) = Action::LookUpOK THEN BEGIN VALIDATE("No.", lrc_VenorItem."Vendor Code"); ... END; END; ... END; // CASE
I hope I could help you.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