WORK DATE PERMISSION

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…

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).

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…

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.

… 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 …

quote:

IF WORKDATE <> TODAY THEN WORKDATE := TODAY; Well, not nice, but maybe it helps …
Originally posted by stryk - 2005 Jun 03 : 12:39:12

Nice or not, still not then actual ‘server-time’… And as a “User” (Windows profile) you are able to change the system date (after the sync with the server date during login).

Ok, its a horrible hack, but the only reliable way I have found to do this, is to craete a field in a table (eg 98) “System Date”, modify appropriate code to use that date (do this via a function in CU1), then use one of many differnt methods to update that field. THe most logical being an external program using ODBC, C/FRONT, Application server etc. I like C/Front, but anything will do.

quote:

Nice or not, still not then actual ‘server-time’…

Well, maybe a NET TIME shell-command does the job (also, not nice as it’s opening a “DOS-Box”) …

quote:

Well, maybe a NET TIME shell-command does the job (also, not nice as it’s opening a “DOS-Box”) …
Originally posted by stryk - 2005 Jun 06 : 03:19:39

I would not recommend doing this on the client, but if you had a C/Front task calling net time on the server, and using this to update a field in the database you would have a better solution, just run it a minte after midnight. Since you would probably use this date in a lot of places, the shell would add quie an overhead to performance. My guess is that they are trying to post invoices on the corret date, or something to that effect.