How to Handle NAV WorkDate in WebServices

company
Member Posts: 89
Hi all,
In Navision when we use WorkDate it returns the Date which we enter in Tools --> WorkDate.
But when we use WorkDate in .NET Web Application using Web Services it is returning the Server systems Today's Date.
I also tried using a variable like i have assigned WorkDate to a variable and used that variable through webservices but also same problem repeats.
can any one help me.
Thanks in advance.
In Navision when we use WorkDate it returns the Date which we enter in Tools --> WorkDate.
But when we use WorkDate in .NET Web Application using Web Services it is returning the Server systems Today's Date.
I also tried using a variable like i have assigned WorkDate to a variable and used that variable through webservices but also same problem repeats.
can any one help me.
Thanks in advance.
0
Comments
-
Err? Do you mean this:
WORKDATE := "Posting Date";
The Workdate variable (function) is just a kind of 'super global', set it to whatever you need.Robert de Bath
TVision Technology Ltd0 -
hi robert,
Thanks for the reply.
The answer you have give is not the answer for the question i have asked , i think you haven't understood my question.
Actually my question is i couldn't use the WORKDATE in navsion as it is in Web application.
i.e for example i have written a function in navision where it filters as below:
Cust.SETFILTER("Date Filter",'..%1',WORKDATE);
and i am calculating the balance due within that date filter.When i run this function navision i am getting the correct value but when i run this function from the web application i am not getting the correct value as the web application is not considering the workdate in the navision client but it is considering todays date i.e if the WORKDATE = 02/02/11 and todays date is 05/31/10 it is considering 05/31/10 due to which i cannot get the same value in web as it is in navision.
So can any one please help me.
thanks in advance.0 -
The Navision webservice setups up a new instance of the "Navision Environment" for every webservice call.
Think of is as starting a new copy of the client for every call. If you have two clients running on a PC and change the workdate in one of them the other is unchanged, same with webservices.
If you want to preserve something between calls you'll have to write yourself some session management routines to save your session data into the database. Of course, it's supposed to be best if web service calls are idempotent.Robert de Bath
TVision Technology Ltd0
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