web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Unhandled script exception: Invalid year '-1' in date function. When accessing Employee PTO Detail

(0) ShareShare
ReportReport
Posted on by

Whenever we try to use the PTO manager's Employee PTO Detail we get the following error.

Unhandled script exception: Invalid year '-1' in date function. Script terminated.

EXCEPTION_CLASS_SCRIPT_OUT_OF_RANGE SCRIPT_CMD_SETDATE

It happens right when you try to open the Employee PTO Detail.  It doesn't matter where you try to access it from within GP.  It also doesn't matter which machine is used.  It happens on all workstations and on the main server.  We don't know exactly how long it's been happening since we only use this screen when there is an issue with PTO which rarely happens. I have tried to turn on the debugger and I get the follow additional information, but the log created didn't have anything that stands out to me.  

PTO_Detail_Inquiry_FORM_PRE on form PTO_Detail_Inquiry

Define_Year_DDL of form PTO_Detail_Inquiry

I found other posts that referenced a similar error message and tried all the solutions suggested. (Changing user time, system time, etc..) I didn't have any luck though.  It doesn't seem to be preventing us from using the screen, but we would like to know why it is happening and fix just to be safe.  Any thoughts or suggestions would be greatly appreciated.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Bill,

    Did you ever figure this out?  I started getting this error yesterday.

    Thanks!

  • Amrapalee Panchal Profile Picture
    100 on at

    Was there any resolution on this one, we are also getting it now on PTO Details inquiry?

  • Sherlene Sorenson Profile Picture
    967 on at

    What was the resolution to this?  We are encountering it after an upgrade to GP2018.x

  • Suggested answer
    Terry R Heley Profile Picture
    Microsoft Employee on at

    If we run a dex.sql log and just capture the error message this will tell us the problem usually.

    Example of what we have seen in the past would be caused by a date value that cannot be interpreted correctly by the dexterity code used to populate the content of the erring window in Dynamics GP.

    Usually and we can confirm with a log that it will be a CHEKDATE column, in example PTO30100 table.

    Thanks

    Terry Heley

    Microsoft

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Dan Liebl Profile Picture

Dan Liebl 2

#2
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans