Getting Values from an open form

johndim
Member Posts: 17
Hello everybody
I have a customer form opened and i want to know if can get from
another form when i push a button the value from one field in the customer form . For instance the No.
Thanks in advance
I have a customer form opened and i want to know if can get from
another form when i push a button the value from one field in the customer form . For instance the No.
Thanks in advance
0
Comments
-
Hi,
If the customer form is a variable of the other form then you could use the GETRECORD function of the customer form variable to get the current record the customer form variable displays.
That way you have every field in the record.0 -
Thanks for the answer but the situation is a liitle diferent
I mean that the steps are exactly as follows :
1 - I open the Customer form and then
2 - from the button Customer i choose to open another form
3 - Now in that other form i want to get the value of a field in customer form
4 - i have to inform you that i don't want to link the two forms
Best Regards John0 -
Hi John,
No easy way you can do this. Every form is independent. Can't see other forms, I wish it could be done, but it's no delphi or VC...
The only way I can think of is to make a global var "CustomerNo" in the "other form" and make a function with a parameter that sets that value.
If you open the form via FORMS::... then you can't do anything, but using a form var, init the var, run the function you created with the customer no., SHOW the form variable, then you have the Customer No, in the global var of the "other form". Remember to call the new function inside the aftergetrecord of the customer form, in order to have them synchronized.
I can't think of anything else...0 -
Tricky one because i'm guessing that your going to do something like this...
Open Customer form on Customer "10000"
Click "RunForm" button and then search through the records until you find the one you want. Once you have found this, THEN I assume that you will want to use a field from this record and pass it back to the record for Customer "10000" ???Remember: Keep it simple0 -
not exactly
i want to be able to get the value of a control in the opened customer form
and read it from another open form . (I don't mean a form variable opened from customer but an other form opened normally)
Thanks both of you for the replies
John0 -
I finally did it with a record variable
in the second form i declared a record variable and i also made a function which populates this record variable with the parameter it gets. In the first form when i press the button i just call the function of the second form via a Form variable and passing the REC as a parameter0
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