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 Review milestone that advances a license to an Issued milestone if an applicant passes an exam or advances the license to a Waiting Period milestone that puts a hold on the license until the applicant passes the exam.
Next milestone formulas use the
oTradeLicense
object (an instance of the
Hansen.CDR.TradeLicense.iTradeLicense
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.
Examples
This formula advances a license to the PriorityReview milestone if it has a high priority and advances the license to a Reviews milestone for any other priority.
NextState = "Reviews"
If oTradeLicense.Priority.Code.ToUpper = "HIGH" Then
NextState = "PriorityReview"
End If
This formula advances a license to the Closed milestone if there are no employees recorded for the license and advances the license to the Reconcile milestone if there are.
NextState = "Closed"
If oTradeLicense.LicenseEmployees.Count > 0 Then
NextState = "Reconcile"
End If