Calculating the next milestone

You can direct Infor Public Sector to calculate which milestone will follow another milestone using a next milestone formula. For example, you could write a formula for a Finalized milestone that advances a single-family dwelling application to a COO Issued milestone or advances a commercial application to a Pre-COO milestone. You specify a next milestone formula when you define a new milestone or change an existing milestone.

Next milestone formulas use the oBuildingApp object (an instance of the Hansen.CDR.Building.iBuildingApplication class) to set NextState to a string value that is the exact name of the milestone that follows it. For more information about this object and for sample code, click the Information tab in the Formula Editor.

Example

This formula advances the application to a Reviews milestone if the application is for a new construction or advances it to a Permit Issued milestone for any other work type.


If (oBuildingApp.WorkType.Code.ToUpper = "NEW") Then
  NextState = "Reviews"
Else
  NextState = "Permit Issued"
End If