How to use TESTFIELD in extensions v2?

SunsetSunset Member Posts: 201
edited 2018-09-05 in NAV Three Tier
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 :neutral:

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

Best Answer

  • SunsetSunset Member Posts: 201
    Answer ✓
    It turned out to be simple :smiley:
    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 yourself

Answers

  • SunsetSunset Member Posts: 201
    Answer ✓
    It turned out to be simple :smiley:
    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 yourself
Sign In or Register to comment.