Print Management in D365fo X++
Print Management in D365fo X++
Code:
Internal static class PrintMgmtDelegatesHandler_DSSL_Class_Extension{ [SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))] public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result) { if(_docType == PrintMgmtDocumentType::SalesOrderInvoice && (curExt() == "5030" || curExt() == "USMF")) { _result.result(ssrsReportStr(DSSLSalesInvoiceReport, SLPrecisionDesign)); //_result.result(ssrsReportStr(DSSLSalesInvoiceReport, CustomerCredetNote)); }} }
Code(OR):[ExtensionOf(classStr(PrintMgmtDelegatesHandler))]public final class PrintMgmtDelegatesHandler_DSA_Class_Extension{ protected static PrintMgmtReportFormatName getDefaultReportFormat(PrintMgmtDocumentType _docType) { PrintMgmtReportFormatName retValue = next getDefaultReportFormat(_docType); switch (_docType) { case PrintMgmtDocumentType::PurchaseOrderRequisition: if(curExt() == "@DSALabel:DSA001451" || curExt() == "@DSALabel:DSA001485") { return ssrsReportStr(DSAPurchPurchaseOrder, Report_New); } break; case PrintMgmtDocumentType::PurchaseOrderConfirmationRequest: if(curExt() == "@DSALabel:DSA001451" || curExt() == "@DSALabel:DSA001485") { return ssrsReportStr(DSAPurchPurchaseOrder, Report_New); } break; case PrintMgmtDocumentType::SalesFreeTextInvoice: if(curExt() == "4040" || curExt() == "USMF") { return ssrsReportStr(DSAFreeTextInvoice, Aqeesa); } break;
case PrintMgmtDocumentType::SalesAdvanceInvoice: retValue = ssrsReportStr(CustAdvanceInvoice, Report); break; } return retValue; }
}
Code:
[ExtensionOf(classStr(PrintMgmtReportFormatPopulator))]final class ADM_PrintMgmtReportFormatPopulator_Extension{ #PrintMgmtSetup protected void addDocuments() { // Add new customized reports this.addOther(PrintMgmtDocumentType::SalesFreeTextInvoice, ssrsReportStr(ADM_FreeTextInvoice, ADMGH), ssrsReportStr(ADM_FreeTextInvoice, ADMGH), #NoCountryRegionId); next addDocuments(); }
}
Comments
Post a Comment