Dynamics NAV: Use server date as WORK DATE

Hi,

Can anybody shed some light on what can I do to the database so that it reads the server date as the work date instead of client as the work date.

I am running Microsoft Navision 4.0 SP2 on a SQL2005 server.

Thank you.

Regards,

Wilson

Hey Wilson,

Before I delve into an answer. Can you let me know the problem domain? Why use the server date? I assume it will be different but the question is why? Different Time Zones?

There is no SERVERDATE funciton in Navision. The only way to emulate such a function, whould be to add a field in a setup table to store server date, and use a routine on the server to update this each day at midnight.

If you use the field DATETIME, then this is based on GMT or UT, and can be used if you need to knwo exactly when the transaction happened.

As Tony says, there are a lot of time zone issues involved here.

If I remember well, a DateTime-field is time-zone independent.
Meaning : If I read 15/01/2006 16.37 from a datetime-field being in Italy, in the UK, someone will read at the same moment 15/01/2006 15.37.
I just tested it for security:
Looked at a record with a certain datetime.Then changed my timezone and refreshed the record and TADA: the datetime has changed!!!

Well dependant on what the problem was I was going to recommend that you add a “Timezone difference” to the “user setup”, That automatically adjusts the Workdate on login for that user CU 1.

It could be as simple as a new DateFormula field on the User Setup table or a whole new “Timezone Table”/system depending on how smart you want to get.

Possible problems are that the local machine will not be able to calculate when the “other” time zone goes over to another day, so work date would be stuck.

I was thinking a Timer set to 30 mins (the smallest time zone change) to check. but someone removed form 330 [;)]

Tony

the reason for using server date is that my client do not want user to change the work date. I had think of using user setup to restrict users from changing the work date but the work date can still be changed when usere change the system date on the client.

Thank you.

Regards,

Wilson

To stop a user changing the system date. Apply a group policy to update all machines Dates and Times from the PDC and also make the group policy stop them changing it (I am sure you can do that).

As for stoping the changing of Workdate. I’m not sure how to do this. Sorry.

This might help form the old forum:

http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=14560

Hi David,

I could not gain access to the html address that u had specified, could u please advise what is being discussed in this particular topic?

Thank you.

Regards,

Wilson

Arnoldus Janssen
Starting Member

Status: offline

Posted - 2005 Jun 01 : 08:16:07 Show ProfileEmail PosterEdit TopicAdd Arnoldus Janssen to BuddylistReply with QuoteView user's IP addressDelete Topic
Hello,Master

Anyone know how to make work date can not be edited in Tool → work date? I hav tried set permission for that but there is no rule for making work date not editable?

Please help me sooon.this is important for me…

Country: Italy ~ Posts: 32 ~ Member Since: 2005 Feb 04 ~ Last Visit: 2006 Apr 27 Alert Moderator

Edward Bloomfield
Senior Member

Status: offline

Posted - 2005 Jun 01 : 15:50:53 Show ProfileEmail PosterVisit Edward Bloomfield's HomepageEdit ReplyAdd Edward Bloomfield to BuddylistReply with QuoteView user's IP addressDelete ReplyStart a new topic from here
Hello,

Unfortunately there is no permission to block this (I put this forward as a suggestion to Navision when V1.30 was the current version).

The nearest solution I can think of is to block the use of such posting dates by setting up a date range in the User Setup (General Ledger → Setup → Users → User Setup).


Edward Bloomfield
Microsoft Business Solutions-Navision Support Consultant
Cambridge Online Systems Limited
www.cambridgeonline.net

“I have reversed the polarity of the neutron flow…”

“The future’s shiny”
www.cybuscorporation.com

Country: United Kingdom ~ Posts: 389 ~ Member Since: 2001 Aug 20 ~ Last Visit: 2006 Jun 19 Alert Moderator Go To Top Of Page

Arnoldus Janssen
Starting Member

Status: offline

Posted - 2005 Jun 02 : 13:28:30 Show ProfileEmail PosterEdit ReplyAdd Arnoldus Janssen to BuddylistReply with QuoteView user's IP addressDelete ReplyStart a new topic from here
Ok, I think it is imposible…

Ok,I try another way,if I get date ONLY from SERVER,How Navision can get it from server?is there a way for that?so in client cannot edit date.

Please help soon…

Country: Italy ~ Posts: 32 ~ Member Since: 2005 Feb 04 ~ Last Visit: 2006 Apr 27 Alert Moderator Go To Top Of Page

Chris Krantz
Senior Member

Status: offline

Posted - 2005 Jun 03 : 17:29:10 Show ProfileEmail PosterEdit ReplyAdd Chris Krantz to BuddylistReply with QuoteView user's IP addressDelete ReplyStart a new topic from here
When you change the workdate, you run some functions in Codeunit 1 to parse the date…In theory, it would be possible to stop things from changing here.

Country: Canada ~ Posts: 489 ~ Member Since: 2000 Mar 16 ~ Last Visit: 2006 Jun 26 Alert Moderator Go To Top Of Page

Joerg Stryk
Advanced Member

Status: offline

Posted - 2005 Jun 03 : 17:39:12 Show ProfileEmail PosterVisit Joerg Stryk's HomepageEdit ReplyAdd Joerg Stryk to BuddylistReply with QuoteView user's IP addressDelete ReplyStart a new topic from here
… maybe in some Form OnTimer Trigger, or a single instance Codeunit using Timer Automation (loaded in CU1 on Login) is performing this statement e.g. every second:

IF WORKDATE <> TODAY THEN
WORKDATE := TODAY;

Well, not nice, but maybe it helps …


Joerg A. Stryk
(MCP, MBSCP)
Pearle Europe Co�peratief U.A.
CompetenceCenter

Country: