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.
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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.
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!
Chn