Hi All,
I have changed work date as today in RTC but when i reopen its taking different date.
how can i fix it please suggest.
Thank you
*This post is locked for comments
are you using cronus company?
so it will be set automatically in CompanyOpen function of Codeunit 1
The default WorkDate is System Date by default. So it will change whenever you will restart the client.
Please refer:
https://msdn.microsoft.com/en-us/library/hh179538(v=nav.90).aspx
-Yogesh KulkarniPlease verify, if you find answer helpful.
If it is a demo company then check codeunit 40 Login Management function GetDefaultWorkDate, it will use GLEntry Posting Date as WorkDate.
if your setup = "cronus"
then : you cannot do anything
else
go to : "user setup" and check your fields are in allowed range
else check the code units
As other suggested if it is cronus db then it will take date defined in system
Hi
Write code in LoginStart Function of LoginManagement like WORKDATE := TODAY and check.
Hello Ramesh,
As per suresh, you could achieve your requirements, just make some changes, see the bellow screenshot
Hi Ramesh,
Create and run a new Codeunit "Fix Demo Company Workdate" with the following code:
OnRun()
IF Company.FINDSET THEN
REPEAT
IF NOT (COMPANYNAME = Company.Name) THEN
CompanyInformation.CHANGECOMPANY(Company.Name);
CompanyInformation.GET;
CompanyInformation."Demo Company" := FALSE;
CompanyInformation.MODIFY;
UNTIL Company.NEXT = 0;
And variables:
Name DataType Subtype Length
Company Record Company
CompanyInformation Record Company Information
Its worked your comment Thanku you so much.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Alexander Ermakov 2
SC666 1