G/L Posting Dates

qngoqngo Member Posts: 58
Is there any way to get a customization that will change the "Allow Posting From" date and "Allow Posting to" to automatically change? Currently we are manually changing the date range everyday on a 4 day range at the most for weekends. We were having problems with people posting to the wrong dates, so we restricted the posting dates everyday.

Thanks [-o<

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can make a change in codeunit 1.

    You can try the function CompanyOpen

    The code shoud look like this
    GLSetup.get;
    GLSetup."Allow Posting From" := workdate -1;
    GLSetup."Allow Posting To" := workdate + 4;
    GLSetup.MODIFY;
    
  • PhennoPhenno Member Posts: 630
    qngo wrote:
    Is there any way to get a customization that will change the "Allow Posting From" date and "Allow Posting to" to automatically change? Currently we are manually changing the date range everyday on a 4 day range at the most for weekends. We were having problems with people posting to the wrong dates, so we restricted the posting dates everyday.

    Thanks [-o<


    Sure it can be autmated but you will have to think of on two issues.

    1) there is no "server date/time" except you have NAS and you declare NAS client date/time as "server date/time". For example if somebody changes NAS "date/time" to year 2010. you will block everybody in their job.

    2) only NAS (at least in this moment) is capable to do some automation jobs like scheduled jobs... maybe there are other solutions but they are surely more complicated than doing this on NAS. Do you have NAS enabled?
  • PhennoPhenno Member Posts: 630
    You can make a change in codeunit 1.

    You can try the function CompanyOpen

    The code shoud look like this
    GLSetup.get;
    GLSetup."Allow Posting From" := workdate -1;
    GLSetup."Allow Posting To" := workdate + 4;
    GLSetup.MODIFY;
    


    One user with wrong workdate can mess-up everything than, I'm afraid...
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yes, this is true.

    But if you have 'less capable' users you can also block changing of the workdate and even chaning the system time on your windows machine. It's just a matter of how far you want to go.
  • PhennoPhenno Member Posts: 630
    Yes, this is true.

    But if you have 'less capable' users you can also block changing of the workdate and even chaning the system time on your windows machine. It's just a matter of how far you want to go.


    Murphy's law... somethin' will/can always go wrong. :)
    If I make sure that "allow range" for posting date is always correct impact to system (regarding dates) will probably be smaller.
  • qngoqngo Member Posts: 58
    Thanks for all the replies, but after speaking to a co-worker, we would prefer to make this automatic to the User's Setup. Is this still possible?

    Thanks
  • PhennoPhenno Member Posts: 630
    qngo wrote:
    Thanks for all the replies, but after speaking to a co-worker, we would prefer to make this automatic to the User's Setup. Is this still possible?

    Thanks

    As I can see in help, settings in user setup Are "greater" than in g/l setup, which means, yes, you Can setup allow dates in user setup table in same way that Mark told you for g/l setup.
  • PhennoPhenno Member Posts: 630
    though, I recommend testing on test database, ofcourse :)
Sign In or Register to comment.