How to get ServerDate in NAV?

chandrurec
Member Posts: 560
Hi all,
I want to get the server date in navision.Generally if I give today I will get the seystem date of the current pc I am working with but not the server date. For getting the server date , is there any keyword available in NAV?
Thanks in advance.
Regards,
Chandru.
I want to get the server date in navision.Generally if I give today I will get the seystem date of the current pc I am working with but not the server date. For getting the server date , is there any keyword available in NAV?
Thanks in advance.
Regards,
Chandru.
0
Comments
-
No.David Singleton0
-
Just search the forum. The answer is there fo last 4 or 5 years I think. Since you can create view on SQL server and link it into NAV table, it is easy to do something like that...0
-
Hi Kine,
I have followed the steps as given below.
creat this view on the ms sql in your Navision Database:
CREATE VIEW dbo.ServerDateTime_View
AS
SELECT '' AS PK, GETUTCDATE() AS ServerDateTime
ORDER BY ''
Create new table in Navision with same name as the view (you can use another
name in the view),
create two fields:
1 PK Code 20
2 ServerDateTime DateTime
Set properties:
DataPerCompany = No
LinkedObject = Yes
Save the table. If you make SDT.GET; (SDT is variable of type Record for
your new table) you have in field SDT.ServerDateTime the server date and
time...
The field PK is there only as simulation of Primary key to be able to make
GET for this table...
But when I run the table , it is giving the error "TableData 50000 does not exist".
If you know how to rectify this error , kindly let me know.
Thanks in advance.
Regards,
chandru.0 -
Hi Chandru,
All the names should be exactly same. Say if you have created the view with name, SDateTimeView, and the fields as PK and SDateTime, you have to use the same names when creating the Navision table in object designer, else this concept will not work.
I hope this will solve your problem.
Note: please delete the table from object designer and re-create.
Cheers!
Chn0
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