OnAfterGetRecord()
IF "Solved Date" = 0D THEN
Aging := WORKDATE - "Reqeusted Date"
ELSE
Aging := "Solved Date" - "Reqeusted Date";
Aging is integer data type.
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?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,558 Super User 2024 Season 2
Martin Dráb 228,647 Most Valuable Professional
nmaenpaa 101,148