How to SET new key to RecRef

ajaybabuCh
Member Posts: 208
Hello
recRef.OPEN(122); -- opening the Purch. Inv. Header
FldRef := recRef.FIELD(44);--- Order No field ref
FldRef.SETRANGE('106015');--- filtering the Purch. Inv. Header table with the Order Number Value.
IF recRef.FINDFIRST THEN;
recRef is using the default primary key or the Purch. Inv. Header Table.
I would like to set a new key that is Order Number , to search for the records effectively by FldRef.SETRANGE('106015');
Can anybody help me how to SET new key to the recRef
Thanks and Regards
Ajay
recRef.OPEN(122); -- opening the Purch. Inv. Header
FldRef := recRef.FIELD(44);--- Order No field ref
FldRef.SETRANGE('106015');--- filtering the Purch. Inv. Header table with the Order Number Value.
IF recRef.FINDFIRST THEN;
recRef is using the default primary key or the Purch. Inv. Header Table.
I would like to set a new key that is Order Number , to search for the records effectively by FldRef.SETRANGE('106015');
Can anybody help me how to SET new key to the recRef
Thanks and Regards
Ajay
Ajay
0
Comments
-
Try to use
REcRef.CURRENTKEYINDEX
;-)
RegardsDo you make it right, it works too!0 -
Thanks garak
I need some sample code for the following
If I have the field number in the current table , for example take field number 44 (Order No.) in Purch. Inv. Header table.
I would like to get the key index which will contain the field number 44 from the current table pointing by the RecRef.Ajay0 -
Just search for example for using KeyRef. E.g. http://www.mibuso.com/dlinfo.asp?FileID=8950
-
sometimes its very easy to open the C/AL Editor and press F1 on the selected function. So, you get the halp and a example, also for REcRef .
RegardsDo you make it right, it works too!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