...{
DataCaptionFields=No.,Name;
OnDelete=BEGIN
TESTFIELD("No. Printed");
LOCKTABLE;
// Delete the following lines.
ServShptItemLine.RESET;
ServShptItemLine.SETRANGE("No.","No.");
ServShptItemLine.DELETEALL;
ServShptLine.RESET;
ServShptLine.SETRANGE("Document No.","No.");
ServShptLine.DELETEALL;
ServCommentLine.RESET;
ServCommentLine.SETRANGE("Table Name",ServCommentLine."Table Name"::"Service Shipment Header");
ServCommentLine.SETRANGE("No.","No.");
ServCommentLine.DELETEALL;
DimMgt.DeletePostedDocDim(DATABASE::"Service Shipment Header","No.",0);
// End of the lines.
END;
CaptionML=[ENU=Service Shipment Header;
PTG=Cabe‡alho Guia Remessa Servi‡o];
LookupFormID=Form5974;
...
...{
DataCaptionFields=No.,Name;
OnDelete=BEGIN
TESTFIELD("No. Printed");
LOCKTABLE;
// Add the following lines.
ServShptItemLine.RESET;
ServShptItemLine.SETRANGE("No.","No.");
ServShptItemLine.DELETEALL;
ServShptLine.RESET;
ServShptLine.SETRANGE("Document No.","No.");
ServShptLine.DELETEALL;
ServCommentLine.RESET;
ServCommentLine.SETRANGE("Table Name",ServCommentLine."Table Name"::"Service Shipment Header");
ServCommentLine.SETRANGE("No.","No.");
ServCommentLine.DELETEALL;
DimMgt.DeletePostedDocDim(DATABASE::"Service Shipment Header","No.",0);
ERROR(Text1110000,"No.");
// End of the lines.
END;
CaptionML=[ENU=Service Shipment Header;
PTG=Cabe‡alho Guia Remessa Servi‡o];
LookupFormID=Form5974;
...
...CODE
{
VAR
CustLedgEntry@1001 : Record 21;
PostCode@1002 : Record 225;
// Delete the following lines.
ServCommentLine@1004 : Record 5906;
ServShptItemLine@1007 : Record 5989;
ServShptHeader@1003 : Record 5990;
ServShptLine@1005 : Record 5991;
DimMgt@1006 : Codeunit 408;
// End of the lines.
PROCEDURE PrintRecords@3(ShowRequestForm@1000 : Boolean);
VAR
ReportSelection@1001 : Record 77;
BEGIN
...
...CODE
{
VAR
CustLedgEntry@1001 : Record 21;
PostCode@1002 : Record 225;
// Add the following lines.
ServShptHeader@1003 : Record 5990;
Text1110000@1110001 : TextConst 'ENU=Posted Service Shipment %1 can not be deleted.';
// End of the lines.
PROCEDURE PrintRecords@3(ShowRequestForm@1000 : Boolean);
VAR
ReportSelection@1001 : Record 77;
BEGIN
...