In Application Architect, on the Ticket Details form, add a C# snippet onto the Contract field's OnChange property.
// Placeholder for code.
// This example does not include Contract's Grace Days
Sage.Entity.Interfaces.ITicket curTicket = this.BindingSource.Current as Sage.Entity.Interfaces.ITicket;
if (curTicket.Contract != null)
{
if (curTicket.Contract.EndingDate < DateTime.Now)
{
DialogService.ShowMessage("The customer's service contract has expired. Contact the Account Manager");
}
}