Copy a globalvalue between forms

msmits
Member Posts: 9
It is simple to run a form (a list of orders), create a menu-button to open a second form with order lines (related to the OrderNo. from the first form). So, I’m not talking about a standard form and subform, but two separate forms.
But…
I know the Companyname in the first form, but I want to copy the Companyname to a global and place it on the second form in a Textfield. Is that possible and how can I do that?
But…
I know the Companyname in the first form, but I want to copy the Companyname to a global and place it on the second form in a Textfield. Is that possible and how can I do that?
0
Comments
-
Hi,
This is the same solution as passing values to sub-forms - i.e. create a function in the second form which assigns the global value and call this function from the first form.
e.g.
Secondform.setglobal( par1,... );
where Secondform is declared as a form
Hope this helps0 -
Hey,
Thanks. But I'm still not able to use the global-value in the form:
The function opens the orderline-form with the OrderNo-filter. If I want to select some lines to fill a textfield with the value of my global, the value remains empty, because it can only be used in the function.0 -
Hi,
This seems a different issue. The record filter is set before it will check the global variable. The solution for this is to create a record variable and filter this in the first form. Create the second form as a variable and use the command Secondform.settableview( Salesline ); You can still pass the variable as long as you are setting the variable to a gobal in the function of the second form.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