Getrecord Function
sridhar
Member Posts: 171
Can any one explain how to use GETRECORD Function ?
I want to get the value of a field from one form to another.
N.Sridhar
I want to get the value of a field from one form to another.
N.Sridhar
0
Comments
-
I've used two methods to pass values from one form to another. The first is creating a function in the form I'm going to call that allows me to pass in the values. Then in my calling code I'll define the form as a variable and before running call the function passing in the values.
The second method is to put a filter on a field in the record variable that you pass into the form when you RUN or RUNMODAL. Then use GETFILTER to retreive the filter value from the field and clear the filter in the OnInit trigger.0 -
Thanks DigiTecKid, but how to use GETRECORD function to fetch record from a form.
Eg : I have a Form "A" with a field "Name". From there I will open another form say "B". If I want to use the value of Name field from Form "A" how I have to use GETRECORD function?
Thanks,
N.Sridhar0 -
From what you are saying then you would have Form "A" that has the Form "B" defined as a variable - FormB. You will also have a variable in Form "A" that is the source table for Form "B" - FormBRec.
IF FormB.RUNMODAL = ACTION::OK then
FormB.GETRECORD(FormBRec);
From there you the FormBRec.Name to use in the code.
I also believe another was to do this is do it with:
IF FORM.RUNMODAL(FORM::"Form B", FormBRec) <> ACTION::OK then
clear(FormBRec);
The FormBRec passed in will have the record selected when the form was closed.0 -
I have a slightly different problem relating to transfering data between two forms.
As standard, after the code Form.RUNMODAL = ACTION::LookupOK the function GETRECORD will be called, so that only one record is known.
Is there anyway to pass through the user selection or the filters that have been applied.
You have SETSELECTIONFILTER within Forms, but it is not something you can call from another form obviously
To complicate this even more, the tables between the two forms are temporary and the way I initially tried to solve the problem would only work if insert permanently to the table I needed, creating it's own problems
The reason for this, is that a user wants to be able to select multiple Serial Numbers (via Item Tracking Lines) and at the moment only one can be selected at a time through the AssistEdit on the Item Tracking Lines form. Therefore I am trying to replicate this without the AssistEdit (calling my own code and form), but the use of temporary tables is causing me a few headaches0
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
- 322 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