On Error related trigger only given three line code is written. This report is standard report - 'Standard Sales - Order Conf.'. Till now I do not write any code, I am first resolving the errors. Sorry, I am not getting which code you are expecting. Below is the complete AL converted code. report 50138 "Sales - Order Conf." { //Report 1305 extension // version NAVW111.00.00.21836 RDLCLayout = 'Standard Sales - Order Conf..rdlc' ; Caption = 'Sales - Confirmation' ; DefaultLayout = Word; PreviewMode = PrintLayout; WordMergeDataItem = Header; dataset { dataitem( Header; "Sales Header" ) { DataItemTableView = SORTING( "Document Type", "No." ) WHERE( "Document Type" = CONST(Order)) ; RequestFilterFields = "No.", "Sell-to Customer No.", "No. Printed"; //ReqFilterHeading = 'Sales Order'; column( CompanyAddress1; CompanyAddr[ 1 ] ) { } column( CompanyAddress2; CompanyAddr[ 2 ] ) { } column( CompanyAddress3; CompanyAddr[ 3 ] ) { } column( CompanyAddress4; CompanyAddr[ 4 ] ) { } column( CompanyAddress5; CompanyAddr[ 5 ] ) { } column( CompanyAddress6; CompanyAddr[ 6 ] ) { } column( CompanyHomePage; CompanyInfo . "Home Page" ) { } column( CompanyEMail; CompanyInfo . "E-Mail" ) { } column( CompanyPicture; CompanyInfo . Picture ) { } column( CompanyPhoneNo; CompanyInfo . "Phone No." ) { } column( CompanyPhoneNo_Lbl; CompanyInfoPhoneNoLbl ) { } column( CompanyGiroNo; CompanyInfo . "Giro No." ) { } column( CompanyGiroNo_Lbl; CompanyInfoGiroNoLbl ) { } column( CompanyBankName; CompanyInfo . "Bank Name" ) { } column( CompanyBankName_Lbl; CompanyInfoBankNameLbl ) { } column( CompanyBankBranchNo; CompanyInfo . "Bank Branch No." ) { } column( CompanyBankBranchNo_Lbl; CompanyInfo . FIELDCAPTION ( "Bank Branch No." )) { } column( CompanyBankAccountNo; CompanyInfo . "Bank Account No." ) { } column( CompanyBankAccountNo_Lbl; CompanyInfoBankAccNoLbl ) { } column( CompanyIBAN; CompanyInfo . IBAN ) { } column( CompanyIBAN_Lbl; CompanyInfo . FIELDCAPTION ( IBAN )) { } column( CompanySWIFT; CompanyInfo . "SWIFT Code" ) { } column( CompanySWIFT_Lbl; CompanyInfo . FIELDCAPTION ( "SWIFT Code" )) { } column( CompanyLogoPosition; CompanyLogoPosition ) { } column( CompanyRegistrationNumber; CompanyInfo . GetRegistrationNumber ) { } column( CompanyRegistrationNumber_Lbl; CompanyInfo . GetRegistrationNumberLbl ) { } column( CompanyVATRegNo; CompanyInfo . GetVATRegistrationNumber ) { } column( CompanyVATRegNo_Lbl; CompanyInfo . GetVATRegistrationNumberLbl ) { } column( CompanyVATRegistrationNo; CompanyInfo . GetVATRegistrationNumber ) { } column( CompanyVATRegistrationNo_Lbl; CompanyInfo . GetVATRegistrationNumberLbl ) { } column( CompanyLegalOffice; CompanyInfo . GetLegalOffice ) { } column( CompanyLegalOffice_Lbl; CompanyInfo . GetLegalOfficeLbl ) { } column( CompanyCustomGiro; CompanyInfo . GetCustomGiro ) { } column( CompanyCustomGiro_Lbl; CompanyInfo . GetCustomGiroLbl ) { } column( CompanyLegalStatement; GetLegalStatement ) { } column( CustomerAddress1; CustAddr[ 1 ] ) { } column( CustomerAddress2; CustAddr[ 2 ] ) { } column( CustomerAddress3; CustAddr[ 3 ] ) { } column( CustomerAddress4; CustAddr[ 4 ] ) { } column( CustomerAddress5; CustAddr[ 5 ] ) { } column( CustomerAddress6; CustAddr[ 6 ] ) { } column( CustomerAddress7; CustAddr[ 7 ] ) { } column( CustomerAddress8; CustAddr[ 8 ] ) { } column( CustomerPostalBarCode; FormatAddr . PostalBarCode ( 1 )) { } column( YourReference; "External Document No." ) { } column( YourReference_Lbl; FIELDCAPTION ( "External Document No." )) { } column( ShipmentMethodDescription; ShipmentMethod . Description ) { } column( ShipmentMethodDescription_Lbl; ShptMethodDescLbl ) { } column( Shipment_Lbl; ShipmentLbl ) { } column( ShipmentDate; FORMAT ( "Shipment Date", 0 , 4 )) { } column( ShipmentDate_Lbl; FIELDCAPTION ( "Shipment Date" )) { } column( ShowShippingAddress; ShowShippingAddr ) { } column( ShipToAddress_Lbl; ShiptoAddrLbl ) { } column( ShipToAddress1; ShipToAddr[ 1 ] ) { } column( ShipToAddress2; ShipToAddr[ 2 ] ) { } column( ShipToAddress3; ShipToAddr[ 3 ] ) { } column( ShipToAddress4; ShipToAddr[ 4 ] ) { } column( ShipToAddress5; ShipToAddr[ 5 ] ) { } column( ShipToAddress6; ShipToAddr[ 6 ] ) { } column( ShipToAddress7; ShipToAddr[ 7 ] ) { } column( ShipToAddress8; ShipToAddr[ 8 ] ) { } column( PaymentTermsDescription; PaymentTerms . Description ) { } column( PaymentTermsDescription_Lbl; PaymentTermsDescLbl ) { } column( PaymentMethodDescription; PaymentMethod . Description ) { } column( PaymentMethodDescription_Lbl; PaymentMethodDescLbl ) { } column( DocumentCopyText; STRSUBSTNO ( DocumentCaption, CopyText )) { } column( BilltoCustumerNo; "Bill-to Customer No." ) { } column( BilltoCustomerNo_Lbl; FIELDCAPTION ( "Bill-to Customer No." )) { } column( DocumentDate; FORMAT ( "Document Date", 0 , 4 )) { } column( DocumentDate_Lbl; FIELDCAPTION ( "Document Date" )) { } column( DueDate; FORMAT ( "Due Date", 0 , 4 )) { } column( DueDate_Lbl; FIELDCAPTION ( "Due Date" )) { } column( DocumentNo; "No." ) { } column( DocumentNo_Lbl; InvNoLbl ) { } column( QuoteNo; "Quote No." ) { } column( QuoteNo_Lbl; FIELDCAPTION ( "Quote No." )) { } column( PricesIncludingVAT; "Prices Including VAT" ) { } column( PricesIncludingVAT_Lbl; FIELDCAPTION ( "Prices Including VAT" )) { } column( PricesIncludingVATYesNo; FORMAT ( "Prices Including VAT" )) { } column( SalesPerson_Lbl; SalespersonLbl ) { } column( SalesPersonText_Lbl; SalesPersonText ) { } column( SalesPersonName; SalespersonPurchaser . Name ) { } column( SelltoCustomerNo; "Sell-to Customer No." ) { } column( SelltoCustomerNo_Lbl; FIELDCAPTION ( "Sell-to Customer No." )) { } column( VATRegistrationNo; GetCustomerVATRegistrationNumber ) { } column( VATRegistrationNo_Lbl; GetCustomerVATRegistrationNumberLbl ) { } column( GlobalLocationNumber; GetCustomerGlobalLocationNumber ) { } column( GlobalLocationNumber_Lbl; GetCustomerGlobalLocationNumberLbl ) { } column( LegalEntityType; Cust . GetLegalEntityType ) { } column( LegalEntityType_Lbl; Cust . GetLegalEntityTypeLbl ) { } column( Copy_Lbl; CopyLbl ) { } column( EMail_Lbl; EMailLbl ) { } column( HomePage_Lbl; HomePageLbl ) { } column( InvoiceDiscountBaseAmount_Lbl; InvDiscBaseAmtLbl ) { } column( InvoiceDiscountAmount_Lbl; InvDiscountAmtLbl ) { } column( LineAmountAfterInvoiceDiscount_Lbl; LineAmtAfterInvDiscLbl ) { } column( LocalCurrency_Lbl; LocalCurrencyLbl ) { } column( ExchangeRateAsText; ExchangeRateText ) { } column( Page_Lbl; PageLbl ) { } column( SalesInvoiceLineDiscount_Lbl; SalesInvLineDiscLbl ) { } column( Invoice_Lbl; SalesConfirmationLbl ) { } column( Subtotal_Lbl; SubtotalLbl ) { } column( Total_Lbl; TotalLbl ) { } column( VATAmount_Lbl; VATAmtLbl ) { } column( VATBase_Lbl; VATBaseLbl ) { } column( VATAmountSpecification_Lbl; VATAmtSpecificationLbl ) { } column( VATClauses_Lbl; VATClausesLbl ) { } column( VATIdentifier_Lbl; VATIdentifierLbl ) { } column( VATPercentage_Lbl; VATPercentageLbl ) { } column( VATClause_Lbl; VATClause . TABLECAPTION ) { } column( ExtDocNo_SalesHeader; "External Document No." ) { } column( ShowWorkDescription; ShowWorkDescription ) { } dataitem( Line; "Sales Line" ) { DataItemLink = "Document No." = FIELD( "No." ) ; DataItemLinkReference = Header; DataItemTableView = SORTING( "Document No.", "Line No." ) ; UseTemporary = true; column( LineNo_Line; "Line No." ) { } column( AmountExcludingVAT_Line; Amount ) { AutoFormatExpression = "Currency Code"; AutoFormatType = 1 ; } column( AmountExcludingVAT_Line_Lbl; FIELDCAPTION ( Amount )) { } column( AmountIncludingVAT_Line; "Amount Including VAT" ) { AutoFormatExpression = "Currency Code"; AutoFormatType = 1 ; } column( AmountIncludingVAT_Line_Lbl; FIELDCAPTION ( "Amount Including VAT" )) { AutoFormatExpression = "Currency Code"; AutoFormatType = 1 ; } column( Description_Line; Description ) { } column( Description_Line_Lbl; FIELDCAPTION ( Description )) { } column( LineDiscountPercent_Line; "Line Discount %" ) { } column( LineDiscountPercentText_Line; LineDiscountPctText ) { } column( LineAmount_Line; FormattedLineAmount ) { AutoFormatExpression = "Currency Code"; AutoFormatType = 1 ; } column( LineAmount_Line_Lbl; FIELDCAPTION ( "Line Amount" )) { } column( ItemNo_Line; "No." ) { } column( ItemNo_Line_Lbl; FIELDCAPTION ( "No." )) { } column( ShipmentDate_Line; FORMAT ( "Shipment Date" )) { } column( ShipmentDate_Line_Lbl; PostedShipmentDateLbl ) { } column( Quantity_Line; FormattedQuantity ) { } column( Quantity_Line_Lbl; FIELDCAPTION ( Quantity )) { } column( Type_Line; FORMAT (Type)) { } column( UnitPrice; FormattedUnitPrice ) { AutoFormatExpression = "Currency Code"; AutoFormatType = 2 ; } column( UnitPrice_Lbl; FIELDCAPTION ( "Unit Price" )) { } column( UnitOfMeasure; "Unit of Measure" ) { } column( UnitOfMeasure_Lbl; FIELDCAPTION ( "Unit of Measure" )) { } column( VATIdentifier_Line; "VAT Identifier" ) { } column( VATIdentifier_Line_Lbl; FIELDCAPTION ( "VAT Identifier" )) { } column( VATPct_Line; FormattedVATPct ) { } column( VATPct_Line_Lbl; FIELDCAPTION ( "VAT %" )) { } column( TransHeaderAmount; TransHeaderAmount ) { AutoFormatExpression = "Currency Code"; AutoFormatType = 1 ; } column( CrossReferenceNo; "Cross-Reference No." ) { } column( CrossReferenceNo_Lbl; FIELDCAPTION ( "Cross-Reference No." )) { } dataitem( AssemblyLine; "Assembly Line" ) { DataItemTableView = SORTING( "Document No.", "Line No." ) ; column( LineNo_AssemblyLine; "No." ) { } column( Description_AssemblyLine; Description ) { } column( Quantity_AssemblyLine; Quantity ) { DecimalPlaces = 0 : 5 ; } column( UnitOfMeasure_AssemblyLine; GetUOMText ( "Unit of Measure Code" )) { //DecimalPlaces = 0 : 5; } column( VariantCode_AssemblyLine; "Variant Code" ) { //DecimalPlaces = 0 : 5; } trigger OnPreDataItem () ; begin IF NOT DisplayAssemblyInformation THEN CurrReport . BREAK ; IF NOT AsmInfoExistsForLine THEN CurrReport . BREAK ; SETRANGE ( "Document Type", AsmHeader . "Document Type" ) ; SETRANGE ( "Document No.", AsmHeader . "No." ) ; end ; } trigger OnAfterGetRecord () ; begin IF Type = Type ::"G/L Account" THEN "No." := '' ; IF "Line Discount %" = 0 THEN LineDiscountPctText := '' ELSE LineDiscountPctText := STRSUBSTNO ( '%1%' , -ROUND ( "Line Discount %", 0.1 )) ; IF DisplayAssemblyInformation THEN AsmInfoExistsForLine := AsmToOrderExists ( AsmHeader ) ; TransHeaderAmount += PrevLineAmount; PrevLineAmount := "Line Amount"; TotalSubTotal += "Line Amount"; TotalInvDiscAmount -= "Inv. Discount Amount"; TotalAmount += Amount; TotalAmountVAT += "Amount Including VAT" - Amount; TotalAmountInclVAT += "Amount Including VAT"; TotalPaymentDiscOnVAT += - ( "Line Amount" - "Inv. Discount Amount" - "Amount Including VAT" ) ; FormatDocument . SetSalesLine ( Line, FormattedQuantity, FormattedUnitPrice, FormattedVATPct, FormattedLineAmount ) ; IF FirstLineHasBeenOutput THEN CLEAR ( CompanyInfo . Picture ) ; FirstLineHasBeenOutput := TRUE; end ; trigger OnPreDataItem () ; begin MoreLines := FIND ( '+' ) ; WHILE MoreLines AND ( Description = '' ) AND ( "No." = '' ) AND ( Quantity = 0 ) AND ( Amount = 0 ) DO MoreLines := NEXT ( - 1 ) <> 0 ; IF NOT MoreLines THEN CurrReport . BREAK ; SETRANGE ( "Line No.", 0 , "Line No." ) ; //CurrReport.CREATETOTALS("Line Amount", Amount, "Amount Including VAT", "Inv. Discount Amount"); TransHeaderAmount := 0 ; PrevLineAmount := 0 ; FirstLineHasBeenOutput := FALSE; CompanyInfo . CALCFIELDS ( picture ) ; end ; } dataitem( WorkDescriptionLines; Integer) { DataItemTableView = SORTING( Number ) WHERE( Number = FILTER( 1 .. 99999 )) ; column( WorkDescriptionLineNumber; Number ) { } column( WorkDescriptionLine; WorkDescriptionLine ) { } trigger OnAfterGetRecord () ; begin /* IF NOT TempBlobWorkDescription.MoreTextLines THEN CurrReport.BREAK; WorkDescriptionLine := TempBlobWorkDescription.ReadTextLine; */ //Replacement of TempBlob if not Instream. EOS then CurrReport . BREAK ; TempBlobWorkDescription . CreateInStream (Instream) ; Instream. ReadText ( WorkDescriptionLine ) ; end ; trigger OnPostDataItem () ; begin CLEAR ( TempBlobWorkDescription ) ; end ; trigger OnPreDataItem () ; begin IF NOT ShowWorkDescription THEN CurrReport . BREAK ; TempBlobWorkDescription .Blob := Header . "Work Description"; end ; } dataitem( VATAmountLine; "VAT Amount Line" ) { DataItemTableView = SORTING( "VAT Identifier", "VAT Calculation Type", "Tax Group Code", "Use Tax", Positive ) ; UseTemporary = true; column( InvoiceDiscountAmount_VATAmountLine; "Invoice Discount Amount" ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( InvoiceDiscountAmount_VATAmountLine_Lbl; FIELDCAPTION ( "Invoice Discount Amount" )) { } column( InvoiceDiscountBaseAmount_VATAmountLine; "Inv. Disc. Base Amount" ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( InvoiceDiscountBaseAmount_VATAmountLine_Lbl; FIELDCAPTION ( "Inv. Disc. Base Amount" )) { } column( LineAmount_VatAmountLine; "Line Amount" ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( LineAmount_VatAmountLine_Lbl; FIELDCAPTION ( "Line Amount" )) { } column( VATAmount_VatAmountLine; "VAT Amount" ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( VATAmount_VatAmountLine_Lbl; FIELDCAPTION ( "VAT Amount" )) { } column( VATAmountLCY_VATAmountLine; VATAmountLCY ) { } column( VATAmountLCY_VATAmountLine_Lbl; VATAmountLCYLbl ) { } column( VATBase_VatAmountLine; "VAT Base" ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( VATBase_VatAmountLine_Lbl; FIELDCAPTION ( "VAT Base" )) { } column( VATBaseLCY_VATAmountLine; VATBaseLCY ) { } column( VATBaseLCY_VATAmountLine_Lbl; VATBaseLCYLbl ) { } column( VATIdentifier_VatAmountLine; "VAT Identifier" ) { } column( VATIdentifier_VatAmountLine_Lbl; FIELDCAPTION ( "VAT Identifier" )) { } column( VATPct_VatAmountLine; "VAT %" ) { DecimalPlaces = 0 : 5 ; } column( VATPct_VatAmountLine_Lbl; FIELDCAPTION ( "VAT %" )) { } column( NoOfVATIdentifiers; COUNT) { } trigger OnAfterGetRecord () ; begin VATBaseLCY := GetBaseLCY ( Header . "Posting Date", Header . "Currency Code", Header . "Currency Factor" ) ; VATAmountLCY := GetAmountLCY ( Header . "Posting Date", Header . "Currency Code", Header . "Currency Factor" ) ; TotalVATBaseLCY += VATBaseLCY; TotalVATAmountLCY += VATAmountLCY; IF "VAT Clause Code" <> '' THEN BEGIN VATClauseLine := VATAmountLine; IF VATClauseLine . INSERT THEN ; END ; end ; trigger OnPreDataItem () ; begin /* CurrReport.CREATETOTALS( "Line Amount", "Inv. Disc. Base Amount", "Invoice Discount Amount", "VAT Base", "VAT Amount", VATBaseLCY, VATAmountLCY); */ TotalVATBaseLCY := 0 ; TotalVATAmountLCY := 0 ; VATClauseLine . DELETEALL; end ; } dataitem( VATClauseLine; "VAT Amount Line" ) { UseTemporary = true; column( VATIdentifier_VATClauseLine; "VAT Identifier" ) { } column( Code_VATClauseLine; VATClause .Code) { } column( Code_VATClauseLine_Lbl; VATClause . FIELDCAPTION (Code)) { } column( Description_VATClauseLine; VATClause . Description ) { } column( Description2_VATClauseLine; VATClause . "Description 2" ) { } column( VATAmount_VATClauseLine; "VAT Amount" ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( NoOfVATClauses; COUNT) { } trigger OnAfterGetRecord () ; begin IF "VAT Clause Code" = '' THEN CurrReport . SKIP; IF NOT VATClause . GET ( "VAT Clause Code" ) THEN CurrReport . SKIP; VATClause . TranslateDescription ( Header . "Language Code" ) ; end ; } dataitem( ReportTotalsLine; "Report Totals Buffer" ) { DataItemTableView = SORTING( "Line No." ) ; UseTemporary = true; column( Description_ReportTotalsLine; Description ) { } column( Amount_ReportTotalsLine; Amount ) { } column( AmountFormatted_ReportTotalsLine; "Amount Formatted" ) { } column( FontBold_ReportTotalsLine; "Font Bold" ) { } column( FontUnderline_ReportTotalsLine; "Font Underline" ) { } trigger OnPreDataItem () ; begin CreateReportTotalLines; end ; } dataitem( LetterText; Integer) { DataItemTableView = SORTING( Number ) WHERE( Number = CONST( 1 )) ; column( GreetingText; GreetingLbl ) { } column( BodyText; BodyLbl ) { } column( ClosingText; ClosingLbl ) { } column( PmtDiscText; PmtDiscText ) { } trigger OnPreDataItem () ; begin PmtDiscText := '' ; IF Header . "Payment Discount %" <> 0 THEN PmtDiscText := STRSUBSTNO ( PmtDiscTxt, Header . "Pmt. Discount Date", Header . "Payment Discount %" ) ; end ; } dataitem( Totals; Integer) { DataItemTableView = SORTING( Number ) WHERE( Number = CONST( 1 )) ; column( TotalNetAmount; TotalAmount ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( TotalVATBaseLCY; TotalVATBaseLCY ) { } column( TotalAmountIncludingVAT; TotalAmountInclVAT ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( TotalVATAmount; TotalAmountVAT ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( TotalVATAmountLCY; TotalVATAmountLCY ) { } column( TotalInvoiceDiscountAmount; TotalInvDiscAmount ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( TotalPaymentDiscountOnVAT; TotalPaymentDiscOnVAT ) { } column( TotalVATAmountText; VATAmountLine . VATAmountText ) { } column( TotalExcludingVATText; TotalExclVATText ) { } column( TotalIncludingVATText; TotalInclVATText ) { } column( TotalSubTotal; TotalSubTotal ) { AutoFormatExpression = Header . "Currency Code"; AutoFormatType = 1 ; } column( TotalSubTotalMinusInvoiceDiscount; TotalSubTotal + TotalInvDiscAmount ) { } column( TotalText; TotalText ) { } } trigger OnAfterGetRecord () ; var CurrencyExchangeRate: Record "Currency Exchange Rate"; ArchiveManagement: Codeunit ArchiveManagement; SalesPost: Codeunit "Sales-Post"; begin FirstLineHasBeenOutput := FALSE; CLEAR ( Line ) ; CLEAR ( SalesPost ) ; VATAmountLine . DELETEALL; Line . DELETEALL; SalesPost . GetSalesLines ( Header, Line, 0 ) ; Line . CalcVATAmountLines ( 0 , Header, Line, VATAmountLine ) ; Line . UpdateVATOnLines ( 0 , Header, Line, VATAmountLine ) ; IF NOT CurrReport . PREVIEW THEN CODEUNIT. RUN (CODEUNIT ::"Sales-Printed", Header ) ; CurrReport . LANGUAGE := Language . GetLanguageID ( "Language Code" ) ; CALCFIELDS ( "Work Description" ) ; ShowWorkDescription := "Work Description" . HASVALUE; FormatAddr . GetCompanyAddr ( "Responsibility Center", RespCenter, CompanyInfo, CompanyAddr ) ; FormatAddr . SalesHeaderBillTo ( CustAddr, Header ) ; ShowShippingAddr := FormatAddr . SalesHeaderShipTo ( ShipToAddr, CustAddr, Header ) ; IF NOT Cust . GET ( "Bill-to Customer No." ) THEN CLEAR ( Cust ) ; IF "Currency Code" <> '' THEN BEGIN CurrencyExchangeRate . FindCurrency ( "Posting Date", "Currency Code", 1 ) ; CalculatedExchRate := ROUND ( 1 / "Currency Factor" * CurrencyExchangeRate . "Exchange Rate Amount", 0.000001 ) ; ExchangeRateText := STRSUBSTNO ( ExchangeRateTxt, CalculatedExchRate, CurrencyExchangeRate . "Exchange Rate Amount" ) ; END ; FormatDocumentFields ( Header ) ; IF NOT CurrReport . PREVIEW AND ( CurrReport . USEREQUESTPAGE AND ArchiveDocument OR NOT CurrReport . USEREQUESTPAGE AND SalesSetup . "Archive Quotes and Orders" ) THEN ArchiveManagement . StoreSalesDocument ( Header, LogInteraction ) ; IF LogInteraction AND NOT CurrReport . PREVIEW THEN BEGIN CALCFIELDS ( "No. of Archived Versions" ) ; IF "Bill-to Contact No." <> '' THEN SegManagement . LogDocument ( 3 , "No.", "Doc. No. Occurrence", "No. of Archived Versions", DATABASE ::Contact, "Bill-to Contact No." , "Salesperson Code", "Campaign No.", "Posting Description", "Opportunity No." ) ELSE SegManagement . LogDocument ( 3 , "No.", "Doc. No. Occurrence", "No. of Archived Versions", DATABASE ::Customer, "Bill-to Customer No.", "Salesperson Code", "Campaign No.", "Posting Description", "Opportunity No." ) ; END ; TotalSubTotal := 0 ; TotalInvDiscAmount := 0 ; TotalAmount := 0 ; TotalAmountVAT := 0 ; TotalAmountInclVAT := 0 ; TotalPaymentDiscOnVAT := 0 ; end ; } } requestpage { SaveValues = true; layout { area( content ) { group( Options ) { Caption = 'Options' ; field( LogInteraction; LogInteraction ) { ApplicationArea = Basic, Suite; Caption = 'Log Interaction' ; Enabled = LogInteractionEnable; ToolTip = 'Specifies that interactions with the contact are logged.' ; } field( DisplayAsmInformation; DisplayAssemblyInformation ) { ApplicationArea = Assembly ; Caption = 'Show Assembly Components' ; ToolTip = 'Specifies if you want the report to include information about components that were used in linked assembly orders that supplied the item(s) being sold.' ; } field( ArchiveDocument; ArchiveDocument ) { ApplicationArea = Basic, Suite; Caption = 'Archive Document' ; ToolTip = 'Specifies if the document is archived after you print it.' ; trigger OnValidate () ; begin IF NOT ArchiveDocument THEN LogInteraction := FALSE; end ; } } } } actions { } trigger OnInit () ; begin LogInteractionEnable := TRUE; ArchiveDocument := SalesSetup . "Archive Quotes and Orders"; end ; trigger OnOpenPage () ; begin InitLogInteraction; LogInteractionEnable := LogInteraction; end ; } labels { } trigger OnInitReport () ; begin GLSetup . GET; CompanyInfo . GET; SalesSetup . GET; CompanyInfo . VerifyAndSetPaymentInfo; end ; trigger OnPreReport () ; begin IF Header . GETFILTERS = '' THEN ERROR ( NoFilterSetErr ) ; IF NOT CurrReport . USEREQUESTPAGE THEN InitLogInteraction; CompanyLogoPosition := SalesSetup . "Logo Position on Documents"; end ; var SalesConfirmationLbl: Label 'Order Confirmation' ; SalespersonLbl: Label 'Sales person' ; CompanyInfoBankAccNoLbl: Label 'Account No.' ; CompanyInfoBankNameLbl: Label 'Bank' ; CompanyInfoGiroNoLbl: Label 'Giro No.' ; CompanyInfoPhoneNoLbl: Label 'Phone No.' ; CopyLbl: Label 'Copy' ; EMailLbl: Label 'Email' ; HomePageLbl: Label 'Home Page' ; InvDiscBaseAmtLbl: Label 'Invoice Discount Base Amount' ; InvDiscountAmtLbl: Label 'Invoice Discount' ; InvNoLbl: Label 'Order No.' ; LineAmtAfterInvDiscLbl: Label 'Payment Discount on VAT' ; LocalCurrencyLbl: Label 'Local Currency' ; PageLbl: Label 'Page' ; PaymentTermsDescLbl: Label 'Payment Terms' ; PaymentMethodDescLbl: Label 'Payment Method' ; PostedShipmentDateLbl: Label 'Shipment Date' ; SalesInvLineDiscLbl: Label 'Discount %' ; ShipmentLbl: Label 'Shipment' ; ShiptoAddrLbl: Label 'Ship-to Address' ; ShptMethodDescLbl: Label 'Shipment Method' ; SubtotalLbl: Label 'Subtotal' ; TotalLbl: Label 'Total' ; VATAmtSpecificationLbl: Label 'VAT Amount Specification' ; VATAmtLbl: Label 'VAT Amount' ; VATAmountLCYLbl: Label 'VAT Amount (LCY)' ; VATBaseLbl: Label 'VAT Base' ; VATBaseLCYLbl: Label 'VAT Base (LCY)' ; VATClausesLbl: Label 'VAT Clause' ; VATIdentifierLbl: Label 'VAT Identifier' ; VATPercentageLbl: Label 'VAT %' ; GLSetup: Record "General Ledger Setup"; ShipmentMethod: Record "Shipment Method"; PaymentTerms: Record "Payment Terms"; PaymentMethod: Record "Payment Method"; SalespersonPurchaser: Record "Salesperson/Purchaser"; CompanyInfo: Record "Company Information"; SalesSetup: Record "Sales & Receivables Setup"; Cust: Record Customer; RespCenter: Record "Responsibility Center"; //Language: Record Language; Language: Codeunit Language; VATClause: Record "VAT Clause"; AsmHeader: Record "Assembly Header"; //TempBlobWorkDescription: Record TempBlob; // Wave2 changes TempBlobWorkDescription: Codeunit "Temp Blob"; // Wave2 changes FormatAddr: Codeunit "Format Address"; FormatDocument: Codeunit "Format Document"; SegManagement: Codeunit SegManagement; CustAddr: array [ 8 ] of Text [ 50 ]; ShipToAddr: array [ 8 ] of Text [ 50 ]; CompanyAddr: array [ 8 ] of Text [ 50 ]; SalesPersonText: Text [ 30 ]; TotalText: Text [ 50 ]; TotalExclVATText: Text [ 50 ]; TotalInclVATText: Text [ 50 ]; LineDiscountPctText: Text ; FormattedVATPct: Text ; FormattedUnitPrice: Text ; FormattedQuantity: Text ; FormattedLineAmount: Text ; MoreLines: Boolean ; CopyText: Text [ 30 ]; ShowShippingAddr: Boolean ; ArchiveDocument: Boolean ; LogInteraction: Boolean ; TotalSubTotal: Decimal ; TotalAmount: Decimal ; TotalAmountInclVAT: Decimal ; TotalAmountVAT: Decimal ; TotalInvDiscAmount: Decimal ; TotalPaymentDiscOnVAT: Decimal ; TransHeaderAmount: Decimal ; [ InDataSet ] LogInteractionEnable: Boolean ; DisplayAssemblyInformation: Boolean ; AsmInfoExistsForLine: Boolean ; CompanyLogoPosition: Integer ; FirstLineHasBeenOutput: Boolean ; CalculatedExchRate: Decimal ; ExchangeRateText: Text ; ExchangeRateTxt: Label 'Exchange rate: %1/%2' , Comment = '%1 and %2 are both amounts.' ; VATBaseLCY: Decimal ; VATAmountLCY: Decimal ; TotalVATBaseLCY: Decimal ; TotalVATAmountLCY: Decimal ; PrevLineAmount: Decimal ; NoFilterSetErr: Label 'You must specify one or more filters to avoid accidently printing all documents.' ; GreetingLbl: Label 'Hello' ; ClosingLbl: Label 'Sincerely' ; PmtDiscTxt: TextConst Comment = '%1 Discount Due Date %2 = value of Payment Discount % ' , ENU = 'If we receive the payment before %1, you are eligible for a 2% payment discount.' ; BodyLbl: Label 'Thank you for your business. Your order confirmation is attached to this message.' ; PmtDiscText: Text ; ShowWorkDescription: Boolean ; WorkDescriptionLine: Text ; Instream : InStream ; local procedure InitLogInteraction () ; begin LogInteraction := SegManagement . FindInteractTmplCode ( 3 ) <> '' ; end ; local procedure DocumentCaption () : Text [ 250 ]; begin EXIT ( SalesConfirmationLbl ) ; end ; procedure InitializeRequest ( NewLogInteraction: Boolean ; DisplayAsmInfo: Boolean) ; begin LogInteraction := NewLogInteraction; DisplayAssemblyInformation := DisplayAsmInfo; end ; local procedure FormatDocumentFields ( SalesHeader: Record "Sales Header" ) ; begin WITH SalesHeader DO BEGIN FormatDocument . SetTotalLabels ( "Currency Code", TotalText, TotalInclVATText, TotalExclVATText ) ; FormatDocument . SetSalesPerson ( SalespersonPurchaser, "Salesperson Code", SalesPersonText ) ; FormatDocument . SetPaymentTerms ( PaymentTerms, "Payment Terms Code", "Language Code" ) ; //FormatDocument.SetPaymentMethod(PaymentMethod, "Payment Method Code"); FormatDocument . SetPaymentMethod ( PaymentMethod, "Payment Method Code", '' ) ; FormatDocument . SetShipmentMethod ( ShipmentMethod, "Shipment Method Code", "Language Code" ) ; END ; end ; local procedure GetUOMText ( UOMCode: Code [ 10 ] ) : Text [ 10 ]; var UnitOfMeasure: Record "Unit of Measure"; begin IF NOT UnitOfMeasure . GET ( UOMCode ) THEN EXIT ( UOMCode ) ; EXIT ( UnitOfMeasure . Description ) ; end ; local procedure CreateReportTotalLines () ; begin ReportTotalsLine . DELETEALL; IF ( TotalInvDiscAmount <> 0 ) OR ( TotalAmountVAT <> 0 ) THEN ReportTotalsLine . Add ( SubtotalLbl, TotalSubTotal, TRUE, FALSE, FALSE ) ; IF TotalInvDiscAmount <> 0 THEN BEGIN ReportTotalsLine . Add ( InvDiscountAmtLbl, TotalInvDiscAmount, FALSE, FALSE, FALSE ) ; IF TotalAmountVAT <> 0 THEN ReportTotalsLine . Add ( TotalExclVATText, TotalAmount, TRUE, FALSE, FALSE ) ; END ; IF TotalAmountVAT <> 0 THEN ReportTotalsLine . Add ( VATAmountLine . VATAmountText, TotalAmountVAT, FALSE, TRUE, FALSE ) ; end ; }
↧
Forum Post: RE: 'Codeunit "Temp Blob"' does not contain a definition for 'Blob'AL(AL0132)
↧
Forum Post: RE: 'Codeunit "Temp Blob"' does not contain a definition for 'Blob'AL(AL0132)
What you have done is just replaced a table with at codeunit - and ofcourse that does not work - You still have to use a table with the blob field or take a closer look at the new codeunit and try to find out how to use it. Upgrading a report from CAL to AL is not an easy task you not the the basics of AL have been understood. You are going to spend quite a lot of time on this, and I would strongly urge you to get someone else to solve your problem - either by sitting next to you and train you in AL-development (the changes) or let the person do all the work for you. An other option would be to take a similar report in made with AL an copy that one a make the necessary changes on that copy.
↧
↧
Forum Post: RE: 'Codeunit "Temp Blob"' does not contain a definition for 'Blob'AL(AL0132)
Thanks for the reply Palle.
↧
Forum Post: RE: Page property of page in Bussiness central cloud
Hi Nikitha, If the extension is installed and you do not have any other extensions installed, who could override these settings, then something must be wrong with your code. But reading your code is not easy, you have way to much code. Are you paid by number of lines of code? So I would start by refactoring your code. pageextension 50007 SOSubFormExt extends "Sales Order Subform" { layout { modify("Unit Cost (LCY)") { Visible = UnitCostIsVisible; Editable = false; } modify("Unit Price") { Visible = UnitPriceIsVisible; Editable = UnitPriceIsEditable; } modify("Line Amount") { Visible = UnitPriceIsVisible; Editable = UnitPriceIsEditable; } addafter("Unit Cost (LCY)") { field("Unit Cost"; "Unit Cost") { Visible = UnitCostIsVisible; Editable = false; ApplicationArea = All; } } } actions { } trigger OnOpenPage() begin MyInitPage(); end; trigger OnAfterGetRecord() begin MyInitPage(); end; local procedure MyInitPage() var UserSetup: Record "User Setup"; begin UnitCostIsVisible := false; UnitPriceIsVisible := false; UnitPriceIsEditable := false; if UserSetup.Get(UserId) then begin UnitCostIsVisible := UserSetup."Unit Cost Visible"; UnitPriceIsVisible := UserSetup."Unit Price Visible"; UnitPriceIsEditable := UserSetup."Unit Price Editable"; end; end; var UnitPriceIsEditable: Boolean; UnitCostIsVisible: Boolean; UnitPriceIsVisible: Boolean; } If this doesn't work, then try to debug your code (not sure if that works in production).
↧
Forum Post: RE: 'Codeunit "Temp Blob"' does not contain a definition for 'Blob'AL(AL0132)
I agree. It's a common misunderstanding that Business Central and AL is just an upgrade to Dynamics NAV and C/Side. It's a completely new way of developing. With NAV you could get around not really knowing how to program. With BC and AL you cannot! And unless you have unlimited time (and already know many other programming languages than C/AL-C/Side), then it's not something I would recommend for self-learning. Take a course and save yourself 100's of hours.
↧
↧
Comment on Microsoft Dynamics NAV 2009 Upgrades and the RTC Reporting Nightmare
Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates. 맞고사이트
↧
Comment on Finding an Easter Egg in the Extensions?
Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing... 맞고게임
↧
Forum Post: RE: Page property of page in Bussiness central cloud
Thanks Eric for reply. My mistake I did not make a procedure and writing code repetitive. I will try suggested code.
↧
Forum Post: RE: report design in Navision 2016
i applied the grouping the property with Bin's Item no , then it will display only the first row of Bin contents only not display the other 2 ros of bin contents
↧
↧
Forum Post: Non-inventory to inventory
We have been working with non-inventory items and items without tracebility (serial numbers). Now we are obliged to keep inventory with s/n tracking for those items, however, Business Central does not allow to change ‘non-inventory’ to ‘inventory’ and does not allow to change the tracebility options. (because there are already item ledger entries). Is there a trick or a way to overrule this ? It is almost impossible to create all new items… Has anyone experience with this issue ?
↧
Forum Post: RE: App test library
Thanks for the info. Erik. I believe this solution is the right direction for docker container BC instances. I still don't believe we have the right solution for importing test libraries into BC SaaS instances. Would be really helpful if anybody can guide here.
↧
Blog Post: Microsoft Dynamics 365: 2020 release wave 1 plan
As you probably already picked up in the media – Microsoft has released its plans for Wave 1 release (in April) for this year. You can find all the information here: https://aka.ms/Dynamics365ReleasePlan . The document contains all the information on all we want to know regarding “what’s next” for all related applications, like Marketing, Customer Service, Field Service, …. and also our beloved “Business Central”. And since this is a blog about Business Central – let’s focus on … Microsoft Dynamics 365 Business Central The Microsoft Docs endpoint that has all information on Business Central is here: https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/planned-features . You can completely disregard this blog, and just read that link, and have all the (updated) information ;-). But – I’m still going to talk about at least a few of these points. I did that before, and last time , I remember I did rant about one thing (Code Customized AL) – let’s see if there is something to rant about in this release ;-). What am I looking forward to? You’ll see I’m focusing most on Tech. and less on functionality. That’s just me – sorry ;-). AL Interfaces I don’t know exactly yet what to expect from this and in which way it will be used in default Microsoft Apps for Business Central, but it is at least a new interesting capability in terms of code architecture. Look up events and insert event subscriber in code Yes! Sounds perfect! By using Shift+Alt+E, you’ll get a list of all available event that you can easily search through: Tip: it seems you can already use it – just use the vsix from the insider-docker-image if you have access ;-). Just be careful though – it seems to add all parameters, even if you don’t need them.. (which in my book is bad practice). Camera/location AL API available in the browser When I read this, my immediate reaction was: “uhm, ok, whatever”. I wasn’t really waiting for this, however, I do think this can really come in handy. Let’s see… Obsolete tag and URL properties I can’t say I needed this, to be honest, but in the future, when real refactoring is going to be necessary, I really think this is very useful to clearly explain the ins and outs of certain functionality that will have to change, and how to deal with that if you depend on it. But then again, in my company, we’re rebuilding the product from scratch. If you’re converting/migrating, I can imagine that “refactoring” will come rather sooner than later ;-). Multiple variable declarations of the same type in the same line You can see that the AL Language is steadily growing into a more mature dev environment, isn’t it. This is something that is so “normal” to have in any other language, and finally coming to AL. Though, I must say, there are other fish to fry, I guess ;-). Ability to refactor a field from a table to a table extension It seems – but I’m not sure – this is an answer on “how to transfer data from a customization in the base app, to an extension”. How this moves to BC online, I don’t know – but definitely worth digging into! Migrations to Business Central online This is obviously really important and need no further explanation! I just hope it’s going to be a painless process, because upgrading to 15 .. Has.not.been.painless.at.all ! But a migration is not an upgrade either, is it? ;-). Business Central integration with Common Data Service – can I get a “finally” here, please? :-). It’s not just “bla bla” anymore – there will actually be some “boom boom” as well – most probably SaaS only. What am I NOT looking forward to? Well, I guess this “ Application version for aliasing base application ” thing. I’m not saying it’s useless, but it looks like this is only added to facilitate “Embed Apps” – which is nothing more than “Code Customized AL” (in my opinion) – and you know how I think about that ;-). Added to this, the “propagateDependencies” has been a change that will be introduced in the next CU Update – and it has brought me nothing but pain – downloading symbols in a build pipeline just became more complex (luckily, navcontainerhelper eases the pain ;-)). Is that all that is new? Of course not! I just didn’t want to “just” copy/paste all items just for the fun of it. All Tech things, ok, but there is so much more that is on the plate: Application enhancements (also read Erik Hougaard’s blog about this) Country and regional availability (Colombia, Croation, Czech, Hungary, Latvia, Slovenia and Peru) API to AppSource to be able to hook up your DevOps for your AppSource Apps (really important) Modern clients – always interesting to see what the new client will bring. What really stands out to me is: Navigate trees more easily – treeview is almost back, I guess Import profiles and UI customizations – very necessary to be able to use this more efficiently (by consultants and admins at customers). I just hope it’s going to be stable, because I have been removing all customizations too often because of client crashes lately :-/. Saving the URL as a bookmark, will include filters now – interesting :-). Improvements to data entry is something everyone likes to read in regards of a web client. But it’s not clear what it actually includes (to me) yet.. . Enable non-interactive printing with advanced printer selection – looks like a good step into a decent printing experience.. . Service fundamentals What am I missing? Monetization for AppSource apps – for sure. I might have misread or missed it, but I still don’t see it on the roadmap. Why? Why oh why? Do we really want 100ds of apps on there with all a different implementation of monetization? That doesn’t make any sense.. . That said – James Crowter wrote a nice article on what HE would have liked to see as prios for 2020. You can find it here: https://msdynamicsworld.com/story/my-dynamics-365-business-central-priorities-microsoft-2020 . You can see he has much more experience with an actual “load” of Customers on BC SaaS. And I can only agree with his list and argumentation.. . Ideas Anyway – a big “driver” of this content is the “Ideas” website where they gather ideas from the community. You can easily access it by: aka.ms/bcideas . If you miss out on anything, the first question you should ask is: “did I ask for it?” ;-). Conclusion Nothing much to conclude besides quite the same as Erik : nothing groundbreaking, but definitely improving and a further evolution.
↧
Forum Post: RE: report design in Navision 2016
please help me. How to display all the bin contents of a particular item .please help
↧
↧
Forum Post: How to add link of report to Actons on home of Business Central
Hi all, I have created a new rdl report which show ledgers. I want to provide a link button to open this report from "Actions" section on home page of Business Central. Do i have to extend the page or do is there anyother way to add in Actions? Regards
↧
Forum Post: RE: How to add link of report to Actons on home of Business Central
Up to my knowledge you need to extend the page. To add new action you need to write code.
↧
Forum Post: RE: report design in Navision 2016
I may help you, but, please, add the screenshot of the layout. I can't help you without it (based on my guessing)
↧
Forum Post: RE: How to add link of report to Actons on home of Business Central
you need to write new (or update the existing) code in the extension.
↧
↧
Blog: Hougaard.com – Applied Hacking
An adventure in Microsoft Dynamics 365 Business Central, NAV, .NET and other technologies
↧
Blog Post: The plan for Business Central 2020 is out
Microsoft just released the list of planned features in the Business Central 2020 Wave 1 update. https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/planned-features Here are my comments on some of the features, selected from a user perspective: (I’ll defer the technical improvements to another blog post) Auto-insert recurring sales and purchase lines Just... Read the full text.
↧
Forum Post: Date Filtering On Report
Hi Guys I have an Agent and agent line table relationship similar to Sales header and line, during agent commission posting there is also tax calculated based on agent line and inserted into tax table. The posting is working well, my problem is on the report section, the report printed from posted agent documents it pools report similar to sales invoice but also needed to bring all taxes related to this Agent. On the report, I added I have three Dataitems 1. Header 2.Line 3. Tax History and the header and line doing what I need which is printing calculated the current commission information for the given document No. and the on the tax history Dataitem section the report is required to bring all the Taxhistory within the current Month of the Document posting date Eg. Document Posted on Jan 30 and Doc report printed it needs to pool all tax history from Jan 1..30 the whole commission tax will be calculated for the month. and I put Tax History - OnPreDataItem() TaxHistory.RESET; TaxHistory.SETFILTER( "Posting Date",'%1..%2',StartDate,EndDate); and this filter doesn't seem to be working. StartDate and EndDate is on Requestpage; Thanks in Advance
↧