Announcements
OnAfterGetRecord()
IF "Solved Date" = 0D THEN
Aging := WORKDATE - "Reqeusted Date"
ELSE
Aging := "Solved Date" - "Reqeusted Date";
Aging is integer data type.
Hi Narayan,
You are right that Date - AnotherDate should return an Integer. But only if the date is defined. If one of the dates is undefined, then you get the error. So you need to test more for 0D, for example
IF "Requested Date" <> 0D THEN
Aging := WORKDATE - "Requested Date"
ELSE
Aging := 0 // (or any ohter default value)
So in this code you test correctly on "Solved date", but you also need to test that "Requested Date" <> 0D before you can use it in a calculateion,
hope that helps
Would you be able to describe the issue you are running into?
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156