Dynamics AX Archives -

Category Archives: Dynamics AX

Load JSON data from Azure Blob Storage to Microsoft Finance and operation

In this blog we will see how to we can integrate data from Azure Blob storage to Microsoft Finance and operations. In this use case we are updating the data in the finance and operation destination Prerequisite: Azure Blob Storage Azure Finance and operation Step 1 : In this we will create the HTTP Trigger workflow or you can selected any trigger based on requirement. Step 2 : Azure Logic App will read the data stored in the Azure Blob Storage in JSON format. Below is sample JSON format, [    {       “MeterId”:”A001″,       “MeterRead”:”100″    },    {       “MeterId”:”A003″,       “MeterRead”:”300″    }    ] Step 3: workflow logic, It will read JSON formatted data which contains the Meter ID and Meter Reading. Based on Meter ID it will fetch the record id. Using record id Meter Reading data will be updated in F&O. Destination Finance and operation:  Hope this helps!

Share Story :

Integrate Customers from Shopify with D365 for Finance and Operation using Microsoft flow

Using Microsoft flow you can automate and organize the flow of data between your Shopify and Microsoft D365 for Finance and Operation This the 1st part of 2. In this, I will show you how customers can be auto-created in D365 for Finance and Operation when it’s created in Shopify. First, log into Shopify as Admin. Navigate to: Settings -> Notifications -> Webhooks (Scroll to the end) -> Create Webhooks and select customer creation, and JSON format. We need a URL for sending customer details, which we will provide later. Now login to power apps or Microsoft automate with D365 account. Navigate to Flows -> New and select Instant from Blank. Now continue as shown in the below screenshots. Here the required URL will be generated after the flow has been saved. Click on the new step and search for Parse JSON. In Content select Body (parameter from previous steps). Now we need JSON schema for customers. You can find a sample Json return response from https://shopify.dev/docs/admin-api/rest/reference/customers/customer?api[version]=2020-04 Copy the response and select Generate from the sample in Powerapps and paste the response. The schema would be now generated. Click on ‘new step’. and search for Dynamics 365 for Fin & Ops. Click on Create record. Select the instance of the environment you want customers in and Entity name ‘CustomerV3’. Now you can place parameters from the previous step (Parse Json) in different fields such as. Mandatory fields that are required to create our customers are Customer account, Currency, Customer group, Company, Organization name. After the values are placed, click on Save at the top right corner. Now expand the first step and a URL will be there. Copy this URL to Shopify webhook and click Save webhook. Now let’s test this. Go to the customer’s section in Shopify and click Add Customer. Write the first name and last name for now and click save. Go to D365 F&O and navigate to All Customers. You should see a new customer created. In the next part, I will show how we can auto-create product in Shopify when created in D365 for Finance and Operation Thank you for reading!

Share Story :

How to enable out of the box hyperlink feature for SSRS Reports in D365 Finance and Supply Chain Management

 In D365 Finance and SCM there are lot of out of the box SSRS reports in which you have hyperlink to move to that particular record (for example Ledger transaction list). But sometimes when you update environment you might end up with no such option in you SSRS report as you can see in following screenshot.  To enable hyperlink features you need to follow following steps:- Navigate to feature management and go to all section in that Search for Report drill through links and disable this feature Search for Report PDF viewer and disable     you need to disable this feature for following limitation which you can find in screenshot. Now check desired SSRS reportNow you are able to see hyperlinks links in the reports I hope this post will be helpful to you, Thank you!

Share Story :

How to export projects layerwise in Microsoft Dynamics AX 2012

 Introduction:  How to export projects layerwise (usr, cus, var, etc.) in Microsoft Dynamics AX 2012?  Details:  Here, we will see how we can export the projects from AX 2012. Now It’s very easy to do so.  We need to create a class or job in the respective environment and just need to do run.  static void exportProjects(Args _args) { #AotExport TreeNodeIterator tni; ProjectNode projectNode; int exportFlag; Dialog dialog = new Dialog(); DialogField folderName; DialogField projectDefinitionOnly; DialogField exportFromLayer; DialogField projectType; UtilEntryLevel layer; SysExcelApplication application; SysExcelWorkbooks workbooks; SysExcelWorkbook workbook; SysExcelWorksheets worksheets; SysExcelWorksheet worksheet; SysExcelCells cells; SysExcelCell cell; SysExcelFont font; int row; CustTable custTable; str fileName; fileName = “D:\\Backup XPOs.xlsx”; //By specifying the directly, we will get the list of exported projects //Excel Part…………………………………………………………………… dialog.addText(“This will export all projects (shared or private) that exist in a selected model.”); projectType = dialog.addFieldValue(enumStr(ProjectSharedPrivate), ProjectSharedPrivate::ProjShared); projectDefinitionOnly = dialog.addField(extendedTypeStr(NoYesId), ‘Project Definition Only’); folderName = dialog.addField(extendedTypeStr(FilePath)); exportFromLayer = dialog.addField(enumStr(UtilEntryLevel), ‘Projects from layer’); dialog.run(); if (dialog.closedOk()) { if (!folderName.value()) throw error(“Missing folder”); exportFlag = #export; if (projectDefinitionOnly.value()) exportFlag += #expProjectOnly; layer = exportFromLayer.value(); switch (projectType.value()) { case ProjectSharedPrivate::ProjPrivate: tni = SysTreeNode::getPrivateProject().AOTiterator(); break; case ProjectSharedPrivate::ProjShared: tni = SysTreeNode::getSharedProject().AOTiterator(); break; } projectNode = tni.next() as ProjectNode; while (projectNode) { if (projectNode.AOTLayer() == layer && projectNode.name() like “CFS*”) //if [like] specifies, system will export the projects which names starts with CFS { projectNode.treeNodeExport(folderName.value() + ‘\\’ + projectNode.name() + ‘.xpo’, exportFlag); row++; } projectNode = tni.next() as ProjectNode; } info(“Projects Exported Successfully & Exported Projects List to Excel Sheet”); } else warning(“No action taken…”); } After running the class it will prompt as below. After that select the directory where to export all projects and select the layer from which layer all projects should be exported.  Thanks for reading!!!

Share Story :

Import, Export and Uninstall the model from Microsoft Dynamics AX 2012

Introduction:  In this blog, we will see how we can import, export and uninstall the model from Microsoft Dynamics AX 2012  Details:  Prerequisite for import, export and uninstall the model from the environment, run the command prompt as in administrator mode. Form Importing the model script:  Install-AXModel -File “Path_Of_the_Model_File” -server ServerName -database DatabaseName_Model –Details Exmaple: Install-AXModel -File “D:\Model\VARModel.axmodel” -server CFSEnvVM -database DAX2012R3CFSEnv_Model –Details Form Exporting the model script:  Export-AXModel -Model ‘Model’ -File ‘Path’ -server ‘ServerName\DBName’ -database ‘DatabaseName_Model’ Exmaple: Export-AXModel -Model ‘CUS Model’ -File ‘C:\ModelFile\CUSModel.axmodel’ -server ‘TESTSERVER\CFSDAXSQL2014’ -database ‘DAX2012R3Blank_model’ Form Uninstalling the model script:  Uninstall-AXModel -Model ‘Model’ -server ‘ServerName’ -database ‘DatabseName_Model’ Exmaple: Uninstall-AXModel -Model ‘VAR Model’ -server ‘CFSEnvVM’ -database ‘DAX2012R3Test_model’ Thanks for reading !!!

Share Story :

What is Kernel Hotfix and Application Hotfix in Microsoft Dynamics AX 2012?

Introduction:  In this blog, we will see what includes in Kernel Hotfix and Application Hotfix in Microsoft Dynamics AX 2012.  Details:  1. Kernel Hotfix:  ·    This hotfix updates Microsoft dlls. E.g. update are the executable files (ax32.exe, ax32serv.exe) and assemblies (Microsoft.Dynamics.AX.*.dll) ·    There are no code-level changes. ·    This hotfix required to install at all the client PCs & Servers, where any of the components of AX is installed. ·    A kernel fix is always cumulative. 2. Application Hotfix:          ·   This type of hotfixes affects code development done by partners. ·    Updates in the SYP, GLP, FPP & SLP layers (the layers reserved for Microsoft code). These changes are made in the AX model store in AX 2012 and later versions ·    An application fix is NOT cumulative.

Share Story :

Import CSV file in D365 for Finance and Operation using X++

Below is a simple example for importing data from CSV file in D365 FO using X++: /// <summary> /// import color code /// </summary> class CFSImportColorCode {     /// <summary>     /// main     /// </summary>     /// <param name = “_args”>_args</param>     public static void main(Args _args)     {         AsciiStreamIo                       file;         Array                               fileLines;         FileUploadTemporaryStorageResult    fileUpload;         CFSEcoResColorCode                  colorCode;         CFSImportColorCode                  importColorCode = new CFSImportColorCode();         Counter                             counter = 0;         EcoResColorName                     color;         #OCCRetryCount         try         {             //Upload a file             fileUpload  = File::GetFileFromUser() as FileUploadTemporaryStorageResult;             file        = AsciiStreamIo::constructForRead(fileUpload.openResult());             if (file)             {                 if (file.status())                 {                     throw error(“@SYS52680”);                 }                 file.inFieldDelimiter(‘;’); //separator                 file.inRecordDelimiter(‘\r\n’);             }             //Read a CSV File             container rec;             ttsbegin;             while (!file.status())             {                 counter++;                 rec = file.read();                 if (conLen(rec))                 {                     color = conPeek(rec, 2);                     colorCode = CFSEcoResColorCode::find(color);                     if(!colorCode.RecId)                     {                         colorCode.clear();                         colorCode.Name  = color;                         colorCode.Code  = conPeek(rec, 1);                         colorCode.insert();                     }                 }             }             ttscommit;             info(“Operation complete.”);         }         catch (Exception::Deadlock)         {             retry;         }         catch (Exception::UpdateConflict)         {             if (appl.ttsLevel() == 0)             {                 if (xSession::currentRetryCount() >= #RetryNum)                 {                     throw Exception::UpdateConflictNotRecovered;                 }                 else                 {                     retry;                 }             }             else             {                 throw Exception::UpdateConflict;             }         }     } }

Share Story :

Change RFQ purchase order status as draft insted of default approved

When we create purchase order using RFQ its default approval status will be approved. To change that status to draft write following code where we will change its status to draft. create new class and add following code class CFSPOStatusRfq {     [PostHandlerFor(classStr(PurchAutoCreate_RFQ), methodStr(PurchAutoCreate_RFQ, endUpdate))]     public static void PurchAutoCreate_PurchReq_Post_endUpdate(XppPrePostArgs args)     {         //PurchTable  purchTable = args.getThis(‘purchTable’);         PurchAutoCreate_RFQ purchReq = args.getThis() as PurchAutoCreate_RFQ;         PurchTable  purchTable, purchTablenew;         purchTable = purchReq.parmPurchTable();         ttsbegin;         select forupdate purchTablenew where purchTableNew.PurchId == purchTable.PurchId;         if(purchTablenew && purchTablenew.DocumentState == VersioningDocumentState::Approved)         {             purchTablenew.DocumentState = VersioningDocumentState::Draft;             purchTablenew.update();         }         ttscommit;     } }

Share Story :

Financial Dimensions in Retail Stores and payment methods in D365 Commerce and Retail

Overview: As we are aware that Financial Dimensions are available for user to identify the posting routine of payments, sales, purchases etc in the ledger account. These values are selectable / mandatory at all checkpoints on D365 FNO. However, in retail we would have to configure the financial dimensions in Retail Store or Payment Methods of retail store. This will help user to identify the posting routine with details of the transaction. If financial dimensions are not mapped then posting will happen but it will be posted as entry without dimensions as below images. Without Financial Dimensions: With Financial Dimensions: To configure Financial Dimensions: Payment Methods: Goto Retail and Commerce > Channels > Stores In Action Tab > Set Up > Payment Methods Select Desired Payment method and in details tab you can find Financial Dimensions 2. Stores: Goto Retail and Commerce > Channels > Stores And select desired store that you want to set the default dimensions on the bottom as shown in the image. (Note: Enabling this will overwrite the Financial Dimensions that were enabled on payment methods as this will be set as Default Dimensions for all types of transactions.) Thanks! Hope this was helpful!

Share Story :

Your connection is not private | NET::ERR_CERT_DATE_INVALID Error in D365 Finance and Operations

As seen in title when error “Your connection is not private | NET::ERR_CERT_DATE_INVALID” occured which seems as follows in screenshot when you try to open environment link in browser. The reason for above error in my case was that SSL certificate was expired as you can see in following screenshot To solve this issue go to your lcs.dynamics.com with your credentials and open your project now select which ever environment and visit see details/Full details page and click on maintain button and select  Rotate secrets button  Now click on Rotate SSL certificates after which dialogue box will appear click on yes  Now wait till rotating secret symbol is loading as following screenshot after which you will be able to access your D365 Finance and operation link easily. Hope this blog will help you.Thank you

Share Story :

SEARCH BLOGS:

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :