Posts

D365 F&O cloud to on prem file transfer using Azure blob storage

Image
  D365 F&O → Azure Blob Container → On-Prem System (file transfer) Scenario: Files generated in Dynamics 365 Finance & Operations (D365 F&O) are uploaded to an Azure Blob Container, and an on-premises system later downloads them using AzCopy . Architecture Flow X++ Code — Upload to Azure Blob Storage: using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.Dynamics.AX.Framework.FileManagement; using BlobStorageAssembly = Microsoft.WindowsAzure.Storage; public class InvoiceFileOnBlobStorage {     public static void main(Args _args)     {         str connectionString = CloudStorageAccount::Parse(             "DefaultEndpointsProtocol=https;AccountName=azureContainerAccountName;"             "AccountKey=7sU+VCk1sb1uCnWChsvwhxvRTY93mSnvhv7b+Aw==;"             "EndpointSuffix=core.windows.net"   ...

JumpRef on form extension/ Access child form record from parent form

Image
Apply JumpRef on form extension/ Access child form record from parent form    Use case : Jump to child form from standard form field and filter records on the child form. Parent form : Let's suppose "SalesTable" is the parent form, and "SalesTable_DS" is its primary data source. Child form : XXX_TestForm is the child form, XXXTestTable_DS is the primary data source. Parent form extension: [ExtensionOf(formStr(SalesTable))] public final class XXXSalesTable_Extension {    public void jumpRef(FormControl _formControl)       {         XXXTestTable     testTable; // Your target table         MenuFunction     menuFunction;         Args args    = new Args();         str refValue = _formControl.valueStr();         if (testTable.RecId)         {             select first...

Generate Text/CSV/DAT file using X++ and upload on Azure blob storage

 Generate Text/CSV/DAT file using X++ and upload on Azure blob storage There are many scenario's where we want to wrap data inside the file and upload on blob storage. Following code use to generate file and upload on azure blob storage. `   public void processOperation(Contract _contract)     {         #OccRetryCount         #File         InventTrans          inventTrans;         Query                query;         QueryRun             queryRun;         str                  stringToWrite;         int                  recordCount = 0;         stringToWrite = "Customer Account Number|Invoice Amou...