capHasExpiredLicProf

Version

1.4

Parameters

Parameter Type Description
pDateType string Expiration date to check. Options (use one): EXPIRE, INSURANCE, BUSINESS.
pLicType (optional) string License type.
pCapId (optional) CapIDModel Record ID object of record. If null, the function applies to the current record.

Returns

Returns true if any licensed professional on the record has expired; otherwise, returns false.

Notes

Checks for expiration by retrieving the licensed professional reference record having the same license # and checking the expiration date specified by pDateType. If the expiration date is on or before the current date, the script returns true. Skips disabled licensed professionals.

Use parameter pLicType to check a specific license type. Use parameter pCapId to check licensed professionals on a record other than the current record.

dateType Expiration Date Field Checked
EXPIRE License Expiration Date
INSURANCE Insurance Expiration Date
BUSINESS Business License Expiration Date