Generate SSRS report as string
Sami Noor Khan Blog
by saminoorkhan
4M ago
Sometimes we have a requirement to send report as a string to business event or API, this code will generate the report and return the string. internal final class VendOrderJourReportHelper { public static void main(Args _args) { VendPurchOrderJour jour = VendPurchOrderJour::findByPurchId('PO-0026224'); VendOrderJourReportHelper::getReportBytesStr(jour); } public static str getReportBytesStr(VendPurchOrderJour _VendPurchOrderJour) { Filename fileName = 'Test.pdf'; PurchPurchaseOrderController controller = new PurchPurchaseOrderController ..read more
Visit website
Reversal for intercompany journal
Sami Noor Khan Blog
by saminoorkhan
4M ago
class CUSJournalManualReversal { static void main(Args _args) { CUSTransactionManualReversalContract contract = _args.parmObject(); TransactionReversalExecutionDetail transactionReversalExecutionDetail = contract.parmReversalExecDetail(); TransDate reversalDate = contract.parmReversalDate(); NoYesId useReversalDate = contract.parmUseExistingDate(); if (transactionReversalExecutionDetail) { LedgerJournalTable ledgerJournalTable = LedgerJournalTable::find(transactionReversalExecutionDetail.JournalBatchNumber); if ..read more
Visit website
Import DMF Projects using flow (Power Automate)
Sami Noor Khan Blog
by saminoorkhan
5M ago
While implementation there is a need to import DMF projects frequently, doing it manually is a huge effort and to automate this task I have created an OData action and Flow. I will explain the implementation of this in this blog. First we need to create an excel file with following information: 1) Title – DMF Project Name (Definition Group) 2) D365 Entity Name 3) Excel File – File name to read from SharePoint We will then create an OData Action with this code below: [SysODataActionAttribute('createDMFProject', false)] public static void createDMFProject(str _defintionGroupName, str ..read more
Visit website
Part 2: Electronic Reporting
Sami Noor Khan Blog
by saminoorkhan
5M ago
In our last blog, we created a very basic electronic report to understand the components involved creating a electronic report. In this blog we are going to take one step ahead, we will use two tables (LedgerJournalTable and LedgerJournalTrans) in our electronic report and we will cover. 1) Join data sources in data model mapping 2) Add filter parameter on the electronic report parameters. 3) Export to an excel format. Let’s get started! 1) Go to Electronic Reporting workspace > Click on Reporting configurations > Create a new configuration and lets call it Ledger Journals 2) Click on ..read more
Visit website
Part 1: Electronic Reporting
Sami Noor Khan Blog
by saminoorkhan
5M ago
To read more about electronic reporting, please visit https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/er-overview-components?context=%2Fdynamics365%2Fcontext%2Fcommerce In this blog, we will be focusing on how to create outgoing electronic document (Electronic report export). We will create a very simple customers list XML report. Go to Electronic Reporting Workspace. Workspaces > Electronic reporting. Click Reporting Configuration. 2. Click on Create Configuration. Select Name and Description for your report and click create configuration. 3. Click on Des ..read more
Visit website
Skip next call on write and validatewrite D365 F&O
Sami Noor Khan Blog
by saminoorkhan
5M ago
https://www.linkedin.com/pulse/skip-write-validatewrite-form-extensions-msdyn365fo-22-heisterkamp ..read more
Visit website
OAuth from X++
Sami Noor Khan Blog
by saminoorkhan
5M ago
OAuth 2.0 authentication using x++ in D365 F&O public str oAuth() { str clientId = “Client ID”; str clientSecret = “Client Secret”; System.Text.Encoding utf8; System.Byte[] byteArray; str authHeader; str byteStr; System.Text.UTF8Encoding encoding; URL url = “oauth token url”; str requestBody = strFmt(“grant_type=client_credentials&client_id=%1&client_secret=%2”, clientId, clientSecret); str header = authHeader; str method = ‘POST’; str contentType = @’application/x-www-form-urlencoded’; encoding = new System.Text.UTF8Encoding(); RetailWebRequest webRequest = RetailWebRequest::newUr ..read more
Visit website
Modify custom alert email
Sami Noor Khan Blog
by saminoorkhan
5M ago
Hi all, recently I had a requirement to modify the email generated from the system when a record is created in credit management. OOB email contains only Sales Order number and and Credit Hold ID. User wanted to see also the customer number and customer name so they can change the credit limit on the customer. Before: After: Solution: 1. Added a new field of type Int64 (RecId) in the EventInbox table. Call it BufferRecId 2. Created an extension of EventActionAlert class. [ExtensionOf(classStr(EventActionAlert))] public final class EventActionAlert_Extension { public void execute ..read more
Visit website
RowCount Method in x++
Sami Noor Khan Blog
by saminoorkhan
5M ago
RowCount method works only for set based operations i.e update_recordset, insert_recordset and delete_from. See the example below. update_recordset custInvoiceJour setting InvoicingName = 'Testing', InvoicePostalAddress = logisticsPostalAddress.RecId where custInvoiceJour.InvoiceAccount == custTable.AccountNum && (custInvoiceJour.InvoiceDate >= startDate && custInvoiceJour.InvoiceDate <= endDate) && custInvoiceJour.DataAreaId == 'XYZ'; Info(strFmt("Operation completed. Total ..read more
Visit website
Change Report Original Preview Dynamically (Sales Invoice)
Sami Noor Khan Blog
by saminoorkhan
5M ago
I had a requirement to change the Original Preview report design based on each customer. class Custom_SalesInvoiceController extends SalesInvoiceController { //SalesInvoiceReport::findReportName finds report name set on the customer on a custom field. protected void outputReport() { SRSCatalogItemName reportDesign; CustParameters custParameters = CustParameters::find(); reportDesign = SalesInvoiceReport::findReportName(custInvoiceJour.InvoiceAccount); if (reportDesign) { this.parmReportName(reportDesign); thi ..read more
Visit website

Follow Sami Noor Khan Blog on FeedSpot

Continue with Google
Continue with Apple
OR