Calculating an expiration date for a case type
You can direct Infor Public Sector to calculate the expiration date for a case using an expiration date formula. For example, you could write a formula that automatically sets the expiration date for a case six months after its initial filing if no action was taken. You specify an expiration date formula when you define a new case type or change an existing case type. You must also select the Calculate Expiration Date check box for each milestone at which you want Infor Public Sector to calculate the expiration date.
Expiration data formulas use the oCase
object (an instance of the Hansen.CDR.CodeEnforcement.iCase
class) to set ExpirationDate
to a date value. For more information about this object and for sample code, click the Information tab in the Formula Editor.
Examples
This formula sets a case to expire one year after the case was reported. This formula will base its expiration date on the Processed status date.
If (oCase.CaseDateTime > 1) Then
ExpirationDate = oCase.CaseDateTime.AddYears(1)
End If
This formula sets a case to expire two weeks after the case was resolved. This formula will base its expiration date on the Resolved status date.
If (oCase.ResolvedDateTime.Year > 1) Then
ExpirationDate = oCase.ResolvedDateTime.AddDays(14)
End If
This formula sets a case to expire if it has been inactive for three months. This formula will base the expiration date on the date of the last recorded activity for the case. An activity is an update or addition to the case or to its supporting information, such as fees, inspections, reviews, and conditions.
ExpirationDate = oCase.LastActivityDateTime.AddMonths(3)