VARIABLEACTIVE in 2009 RTC or webservices

ara3n
Member Posts: 9,258
Hello
Client is upgrading and one of their modification is using the VARIABLEACTIVE(RecordRef) .
When calling this from webservice they get the following error.
I have not used VARIABLEACTIVE ever in my code ever.
The documentation is slim
So the question is what is the substitute for this function that is obsolete in 3 tiered 2009.
I didn't see anywhere in documentation that this function was obsolete.
Client is upgrading and one of their modification is using the VARIABLEACTIVE(RecordRef) .
When calling this from webservice they get the following error.
<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Types.Exceptions.NavObsoleteMethodException</faultcode> <faultstring xml:lang="en-US">The VARIABLEACTIVE() method is obsolete.</faultstring> <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">The VARIABLEACTIVE() method is obsolete.</string>
I have not used VARIABLEACTIVE ever in my code ever.
The documentation is slim
Use this function to determine if a variable, such as field or a control, is active or inactive.
So the question is what is the substitute for this function that is obsolete in 3 tiered 2009.
I didn't see anywhere in documentation that this function was obsolete.
0
Comments
-
May be you can compare some part of the RecordRef which must be set to be active, e.g. tableno or something... all depends on the meaning in the code where it is used...0
-
The code is called in a function
CheckOnModify(RecordRef) if not VARIABLEACTIVE(RecordRef) then exit;
The function is called from CU 1 onglobalModify trigger.
I'm simplifying this and I'm sure the function is called other ways. So how can I check that a recordref is initialized?
I guess I could format(recref) = '' then it's not initialized?0 -
Yes, you could try it, it will be empty if not active, else it return something...0
-
I'm hoping to see if somebody from MS answers this.0
-
In the case of RecordRef, what you propose with checking the FORMAT string is the only way currently. In 2009 SP1 the NUMBER function will return 0 and this well be a slightly neater test.
Generally, VARIABLEACTIVE is tied into the AL runtime and when moving to the CLR it simply has no meaning for basic types, although it could have been special-cased for the complex ones. The cleanest handling was to obsolete it totally.
MSDN has a summary of similarly obsoleted functions or changes in behavior:
http://msdn.microsoft.com/en-us/library/dd301289.aspxDean McCrae - Senior Software Developer, NAV Server & Tools
This posting is provided "AS IS" with no warranties, and confers no rights.0 -
Thank you for the info.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