ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] table 5965 "Service Contract Header" - OnBeforeCheckCaseContract
Hello, would it be possible to add OnBeforeCheckCaseContract, event to table 5965 "Service Contract Header", like this:
field(5; Status; Enum "Service Contract Status") trigger OnValidate()
...
case "Contract Type" of
"Contract Type"::Contract:
begin
IsHandled := false;
> OnBeforeCheckCaseContract(Rec, IsHandled); //New Event
if not IsHandled then **begin**
...
if ServLedgEntry."Amount (LCY)" <> 0 then
StrToInsert := OpenPrepaymentEntriesExistTxt;
if not ConfirmManagement.GetResponseOrDefault(
StrSubstNo(CancelTheContractQst, StrToInsert), true)
then begin
Status := xRec.Status;
exit;
end;
FiledServContract.FileContractBeforeCancellation(xRec);
end;
**end;**
"Contract Type"::Quote:
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckCaseContract(var ServceContractHeader: Record "Service Contract Header"; var IsHandled: Boolean)
begin
end;
Please correct this request, you code does not look good for implementation
Hello, Thanks for bringing this to our attention. I have updated the request to show more details. The purpose of this event is the possibility to exit the code inside case of "Contract Type"::Contract