I have a trigger and a part of the trigger acts as a validation rule and it will fire an validation message whenever a user tries to create a Work order on an Expired entitlement. So now I don't see any error in trigger's Helper class but when I create a work order on an expired entitlement, I am seeing a Different message and I Don't think it is an error as I am not being notified about it by Salesforce.
I encounter the following error:
Error: Invalid Data. Review all error messages below to correct your data. Apex trigger sm1e.WorkOrderTrigger caused an unexpected exception, contact your administrator: sm1e.WorkOrderTrigger: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Work order cannot be updated, since Entitlement of this work order is not active.: : (sm1e)
What changes do I need to make?