Pass Parameter from Form to corresponding Table...

Jut
Member Posts: 72
Hallo!
I'm seriously fighting with one small tiny problem.
I try to customize the Account-Schedule-Form. Unfortunately, many information inside this form are stores inside of variables. Now, if the user enters for example a new Date-Filter, I need to use the information of same variables (e.g. ColumnLayoutName) in the On-Validate-Trigger of the corresponding table (Acc. Schedule Line). I tried to manage it using a Set-Function in the table which is called from the form and stores the values in a global var in the table- but the value of the global var is always lost in the trigger.
I even tried it the other way round: in the onvalidate-trigger i created a from var (account schedule form) and then i call the get-function of this form. but it still doest help because there seems to be no connection to the form the user used to enter the date-filter. Can anyone help me with this problem?
I hope you understand what I mean
bye bye
Jut
I'm seriously fighting with one small tiny problem.
I try to customize the Account-Schedule-Form. Unfortunately, many information inside this form are stores inside of variables. Now, if the user enters for example a new Date-Filter, I need to use the information of same variables (e.g. ColumnLayoutName) in the On-Validate-Trigger of the corresponding table (Acc. Schedule Line). I tried to manage it using a Set-Function in the table which is called from the form and stores the values in a global var in the table- but the value of the global var is always lost in the trigger.
I even tried it the other way round: in the onvalidate-trigger i created a from var (account schedule form) and then i call the get-function of this form. but it still doest help because there seems to be no connection to the form the user used to enter the date-filter. Can anyone help me with this problem?
I hope you understand what I mean

bye bye
Jut
0
Comments
-
1) Can you post your code?
2) Are you passing the values into function through Rec variable or some new global defined?0 -
1) yeah of course:
This is inside table acc. schedule line. AccSchedForm ist a for-variable with subtype: account schedule form
{ 11 ; ;Date Filter ;Date ;FieldClass=FlowFilter;
OnValidate=BEGIN
IF NOT AccSchedManagement.CheckUserRight(Rec,AccScheduleForm.GetAccountLayoutName()
,AccScheduleForm.GetAccountScheduleName()) THEN
ERROR(Text016);
END;
CaptionML=[DEU=Datumsfilter;
ENU=Date Filter] }
This is my Get-Function in the Account-Schedule-Form:
PROCEDURE GetAccountScheduleName@1109200008() : Code[10];
BEGIN
EXIT(CurrentSchedName);
END;
As you can see, only the global-var CurrentSchedName of the form is passed to the table.
I started the form and changed the DateFilter.Unfortunately, no value is retrieved from the form although the global-var CurrentSchedName certainly has a value!
2) The other way round (from form -> table) I passed it through Rec-Variable.0 -
The only way I could get the value from form to table was by using my codeunit 8 (accScheduleManagement) to store the values - but I had to make it singleInstance what probably is no good idea0
-
Of course that you cannot read the value from form (pull the value). You need to use Push method. You need to use something like this in the form:
Rec.SetMyGlobalVariable(Value); Rec.VALIDATE(MyField,FieldValue);
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