Calculating whether to add an endorsement
You can use an AddOnCondition formula to calculate whether an endorsement is added to a license. For example, you could write a formula that requires a catering endorsement if a restaurant owner plans to do off-site catering.
AddOnCondition formulas use the oLicenseApp
object (an instance of the Hansen.CDR.BusinessLicense.iLicenseApplication
class) to set AddOnCondition
to either True or False. For more information,
and for sample code, click the Information tab in the Formula Editor.
Example
This formula adds an endorsement if the word "catering" is included in the license's comments:
AddOnCondition = False
If oLicenseApp.Comments.ToLower.IndexOf("catering") > -1 Then
AddOnCondition = True
End If