How to use TESTFIELD in extensions v2?

Sunset
Member Posts: 201
Hi all, I've got a question that is most likely just me being dense; but I can't find the correct use of TESTFIELD when using it in extensions 
In the "old" time TESTFIELD(Type); would make the system check whether Type was empty or not, and throw an error if it was empty. And TESTFIELD(Type, Type::Item); would throw an error if the Type was anything other than Item.
But if I try to use TESTFIELD in the extension constantly get a error saying: The call is ambiguous between the following methods or properties: 'TestField(Joker, Integer)' and 'TestField(Joker, Integer)'
And this is regardless of me trying to make sure a field has a value, or making sure that it has a specific value. What am I missing here?
Please don't tell me I have to make IF THEN ELSE sentences to handle this.

In the "old" time TESTFIELD(Type); would make the system check whether Type was empty or not, and throw an error if it was empty. And TESTFIELD(Type, Type::Item); would throw an error if the Type was anything other than Item.
But if I try to use TESTFIELD in the extension constantly get a error saying: The call is ambiguous between the following methods or properties: 'TestField(Joker, Integer)' and 'TestField(Joker, Integer)'
And this is regardless of me trying to make sure a field has a value, or making sure that it has a specific value. What am I missing here?
Please don't tell me I have to make IF THEN ELSE sentences to handle this.
Don't just take my word for it, test it yourself
0
Best Answer
-
It turned out to be simple
You need to put Rec. in front of it. Kinda makes sense since the extension needs to have a reference as to what/where you want to test.Don't just take my word for it, test it yourself0
Answers
-
It turned out to be simple
You need to put Rec. in front of it. Kinda makes sense since the extension needs to have a reference as to what/where you want to test.Don't just take my word for it, test it yourself0
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