Can't used Function PAGE.RUNMODAL(0,.. As Customized Object

QuickWE
Member Posts: 80
Hello expert
now i have some problems during I'm upgrading my database from 2009R2 --> 2013
When I used Function PAGE.RUNMODAL(0,..) As Customized Object,
My code is PAGE.RUNMODAL(PAGE::"Magazin Journal Archiv",StoffeBuBlArchiv); ,just simple error
I found error
The error is
Microsoft Dynamics NAV Development Environment
The variable is not a record. 'Variable.Field' is invalid.
OK
But for Standard objects can used this function .I 'm not sure .why this error occur ,please give me any guidance for fixed this problems
Thank in advance.
now i have some problems during I'm upgrading my database from 2009R2 --> 2013
When I used Function PAGE.RUNMODAL(0,..) As Customized Object,
My code is PAGE.RUNMODAL(PAGE::"Magazin Journal Archiv",StoffeBuBlArchiv); ,just simple error
I found error
The error is
Microsoft Dynamics NAV Development Environment
The variable is not a record. 'Variable.Field' is invalid.
OK
But for Standard objects can used this function .I 'm not sure .why this error occur ,please give me any guidance for fixed this problems
Thank in advance.
0
Comments
-
Is StoffeBuBlArchiv a record variable?0
-
mohana_cse06 wrote:Is StoffeBuBlArchiv a record variable?
Yes, it is a record variable. that already defined.0 -
Please comment the above code and compile again..
Where is pointer stopping after pressing ok on error mesage?0 -
In the past I have seen this error in quite tricky conditions. The code was pretty much the following:
PROCEDURE Something(Customer: Record Customer) WITH ContactRecord DO Customer."No." := 'xxxx';
The issue was that somebody added Customer as a field to the Contact table and the Customer in Customer."No." was evaluated as that field instead of the Customer in the procedure parameters. And therefore this code stopped with the same error as yours even though I have not touched it at all (we have just added that Customer field to the Contact table). I can therefore imagine e.g. that you might have e.g. field called Page in the default context the code is running or something similar. (I know that RUNMODAL should not be evaluated as field but as function but I am not sure what the error would be in the case where Page was evaluated as field). I would also check broader context of the failing code to see where the naming collision can come from.
Regards,
Igor0 -
ichladil wrote:In the past I have seen this error in quite tricky conditions. The code was pretty much the following:
PROCEDURE Something(Customer: Record Customer) WITH ContactRecord DO Customer."No." := 'xxxx';
The issue was that somebody added Customer as a field to the Contact table and the Customer in Customer."No." was evaluated as that field instead of the Customer in the procedure parameters. And therefore this code stopped with the same error as yours even though I have not touched it at all (we have just added that Customer field to the Contact table). I can therefore imagine e.g. that you might have e.g. field called Page in the default context the code is running or something similar. (I know that RUNMODAL should not be evaluated as field but as function but I am not sure what the error would be in the case where Page was evaluated as field). I would also check broader context of the failing code to see where the naming collision can come from.
Thank for all replies,but unfortunately this case may be differences ,I tried to move code PAGE.RUNMODAL(0,..) to the first line of triggers (OnValidate of "No." fields) but the same error still occurs.
The pointer is stopped at after 'E' (PAGE|.RUNMODAL(0,LagerplatzRec))
Regards,
Igor0
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