Are you like me going crazy to figure out how to find the integer value of an enum type? No problem, the solution is around the corner. In this case you have 2 options : Open SSMS SQL session and run a query. Create a job / Runnable class SQL Query Job / Runnable class
How to add a new button in the MPOS D365 Commerce Retail screen? Just follow these steps Go to Retail and Commerce > Channel setup > POS setup > POS > Screen layouts Filter for “F3CSH” screen layout Id assigned to your MPOS user (or Register or Store)Select the screen size (in layout sizes tab)…
To add security roles to system users just follow these instructions Go to “System Administration” –> “Users” Search the user you want to assigni the new roles and Double-click on it Here you’ll find roles already assigned to the user. If you want to assign new roles just click on “Assign Roles” button Choose the…
Use setAttribute method() to add custom Namespace to an XML node like shown below
A quality update is a cumulative, roll-up build that contains fixes for known issues that are specific to the service update. A quality update is available when your environment is running the same version of the current service update (n), or when your environment is running on one version older than the current service update…
To check your D365FO cloud hosted environements Environment ID and Application release and Platform release just follow this steps: Access your LCS Project Access the environment you want to check (choose Sandbox or Production environment) Here you get : Environment ID : ……………………. Application release : 10.0.22 Platform release : PU46 (7.0.6164.49)
For me one of the best online online XML Formatter and beautifier –> https://jsonformatter.org/xml-viewer
Here you can find the official X++ Programming Language reference guide : https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-language-programming-guide?redirectedfrom=MSDN
To submit issues directly to Microsoft, select the Support tile in your LCS project. You can then submit issues in two ways: On the Active issue tab, select your issue, and then select Submit to Microsoft. On the Submitted to Microsoft tab, select Submit an incident, and then follow the on-screen instructions to submit the incident. After you submit an incident, you will…
Reference article : https://docs.microsoft.com/en-us/dynamicsax-2012/developer/collection-classes-in-microsoft-dynamics-ax The collection classes are shown in the following table. Class Description Array Similar to the X++ language array type except that it can hold values of any single type, including objects and records. Objects are accessed in a specific order.For more information, see X++, C# Comparison: Array Syntax. List Contains elements that…
If your query has just one datasource you can use SysQuery::countTotal If we need to count number of records of a query with more than one datasource, you must use SysQuery::CountLoops(QueryRun).
Find the handler classes that are triggered when a workflow starts is not an easy First you have to get the workflow ID and name In this example the workflow ID is 000009 and the name is “VendrequestNVATTemplate” After find the name go to Visual Studio and search for it in AOT. Opern the designer…
With Runbuf() you can execute an external x++ code To show how it works, I am going to use this function to execute code read from an external file. In this example I want to retrieve the Customer Name from a given Customer Account number. First create an external file in c:\temp\ and call it…
You can organize the constants used in your code by creating a macro in the AOT for keeping all your constants in one place. Also is a good idea if your macro is going to be used in several places so you will be able to reuse the macro.To create a new macro in the…
To get the Vendor name just use vendTable.vendorName() method. This retrieves the Party name related to a specific vendor
While debugging Visual Studio not stopping on your breakpoints? This could be that your D365 debug symbols are not loading. There are several settings that need to be set correctly to allow D365 debug symbols to load. This article will explain how you can troubleshoot this issue (see below)
The only way to get access to UAT Sandbox SQL Server database throught SSMS is to make a request from LCS. This is access is only for 8 hours, after that time you need to request access again. So Login to LCS Go to UAT environment -> Full details. You should see request access controls…
The workflow infrastructure uses batch processing on AOS to execute workflows so in order to debug it you have to open Visual Studio in Administrator mode and attach to the Batch.EXE process. Now you can debug
Follow this article to create an Azure hosted Build machine : https://ariste.info/en/2020/05/azure-hosted-build-dynamics365-finance-scm/#configure-pipeline You can automate the process of building X++ code and creating deployable packages on any build agent that run on Microsoft Windows. These agents include Microsoft-hosted agents. This approach helps you avoid the setup, maintenance, and cost of deploying build virtual machines (VMs).…
You can use Microsoft Dynamics Lifecycle Services (LCS) to perform a refresh of the database to a sandbox user acceptance testing (UAT) environment. A database refresh lets you copy the transactional and financial reporting databases of your production environment into the target, sandbox UAT environment. If you have another sandbox environment, you can also copy…
I want to add a list of values in an “OR” Condition for a same field in a QueryBuildRange. The result must be something like that select * from CustGroup where custGroup.CustGroup == ’50’ || custGroup.Group ==’90’; To do that Just add range and assign value on the same field multiple times as shown in code…
To set word wrap preferences On the Tools menu, select Options. In the Text Editor folder, choose the General options in the All Languages subfolder to set this option globally.— or —Choose the General options in the subfolder for the language in which you are programming. Under Settings, select or clear the Word wrap option.When the Word wrap option is selected, the Show visual glyphs for word wrap option is enabled. Select the Show…
When using AX, there are a lot of times where you want data to go across companies. To set a Table to Cross company just set NO the “Save Data per Company” property
The Customization Analysis Report is a tool that analyzes your customization and extension models, and runs a predefined set of best practice rules. The report is one of the requirements of the solution certification process. The report is in the form of a Microsoft Excel workbook. Click here to view some examples on how to…
If you are facing this error : “The database could not be exclusively locked to perform the operation. (Microsoft SQL Server, Error: 5030)” when you try to rename SQL server database you need to temporary switch from Multi User mode to single user mode, then rename the database and then set it back to Multi…
If you’re facing the error “Cannot open W3SVC service on computer” while opening Visual Studio you probably are trying to access without administrator permission. To open with Visual Studio Administrator privileges open Properties in application Task bar Click “Advanced” Check “Run as Administrator” and OK
Access LCS with an Administrator account and click on your project Access the environment you want to export Click on Maintain –> Move database Click on “Export Database”. This operation could take up to 24 hours…. After the operation is completed click on Asset library Search your Database and click on it to download the database file…
Create the VM Access LCS with an Administrator account and click on your project Click on “Cloud-hosted environments” Click on “Add” Choose D365FO Version Set Environment name and click on “Advanced settings” Check these settings Check these settings Click Next Wait 6-7 hours until completion Once completed click on “Local Accounts” (a remote desktop session…
We recently encountered two errors when attempting to deploy cloud-hosted environments within LCS. “Lifecycle Services cannot perform the current {0} operation. Received null or empty value for parameter {1}”The diagnosis was that we were accessing LCS with an account in a different AAD domain than the Azure subscription tenant. To solve use an administrator account…
MICROSOFT AX/D365FO Official documentation in english language : MICROSOFT AX/D365FO Official documentation in italian language :
The following X++ job code sample creates a file and writes to it. Next the code reads from the file, and prints every record to the Infolog. This is the output result Message (14:12:47)File is at: C:\DOCUME~1\myalias\LOCALS~1\Temp\Test_File_IO.txtHello World.The sky is blue.
This code shows how to pass user and password to a Web Service from AX
When consuming a web service from AX this error can occour: System.ServiceModel.CommunicationException: An error occurred while making the HTTP request to ……… This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding…
In Microsoft Dynamics AX, when your X++ code calls .NET framework methods it is important that your code be designed to handle exceptions. When your code catches exceptions it can relay valuable diagnostic information to the user. The following X++ code sample demonstrates how to handle exceptions that are thrown from .NET methods
In SQL it is common to use like when querying data. For example, the following SQL statement queries the CustTable table for all customers that begin with ’12’ It is also possible to use like in X++ syntax. The following X++ statement queries the CustTable table for the same data:
If you have tried to use Update_recordset with CrossCompany option you’ll probably have faced this error : “Cannot update multiple records in yourTable(yourTable).Cross company update_recordset operation should skip database logging.” The reason is because you have to disable database logging before to proceed To solve this issue you must use these methods : yourTable.skipDataMethods(true); yourTable.skipDatabaseLog(true);…
This is a nice post that describes how to debug a copy of the production database in D365FO : https://rahulmsdax.blogspot.com/2019/03/debug-copy-of-production-database-in.html
This is a good article that describes how to connect to a non production environment with SSMS https://stoneridgesoftware.com/how-to-connect-to-your-non-production-d365-finance-and-operations-database/
This post describes how to write a recursive method in X++ In this example I get all the child Categories of a given Parent Category and write them into an info log.
Reference article : https://shyamkannadasan.blogspot.com/2016/06/ax-creates-xml-file-in-x-containing.html This example create an XML file in X++ containing employee details
In this example method we pass 2 parameters : Ledger dimension record An Attribute named “BusinessUnit”. The attribute of which we want to retrieve the value This methods returns the sigle dimension Attribute value
This a good article that describes how to integrate a third party application with D365FO using Data management framework Data Packages and REST API : https://azureintegrations.com/2019/10/15/d365fo-interacting-with-data-management-frame-work-using-rest-api-for-delta-changes-on-entity/
This a good article that describes how to integrate a third party application with D365FO using C# Console application and ODATA REAST API. In this example we’ll insert a new record throught a Data Entity : https://shootax.blogspot.com/2019/10/d365fo-data-integration-by-odata-part-1.html
Reference article : https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/lcs-solutions/process-data-packages-lcs-solutions Microsoft Dynamics Lifecycle Services (LCS) contains multiple base data packages that you can use to reduce the implementation time. These packages contain the elements that are required in each module/area in order to meet the minimum requirements. For advanced business processes, you might have to add more entities to the list…
This topic explains how to use the Upgrade analyzer tool to plan your upgrade from Microsoft Dynamics AX 2012. This tool is run against an AX 2012 environment and identifies data that you should clean up in AX 2012 to help reduce the subscription cost for Finance and Operations. The tool also suggests SQL configuration…
This is small utility code if we need to unsettle payments and invoice Reference article : https://community.dynamics.com/ax/b/amirsaxspace/posts/x-code-to-unsettle-payment-and-invoice
This article describes how to export an XML file using Electronic reporting : https://powerobjects.com/dynamics-365-finance-operations/electronic-reporting-explained/
The following X++ code example shows a join of three tables on an insert_recordset statement that has a sub-select. Also, a while select statement with a similar join is shown. A variable is used to supply the inserted value for one column. The str variable must be declared with a length that is less than or…
This is an example on how to update a Datetime field including Hour, minutes and seconds
In case of a power failure, an application error, or other unexpected failure, the system cannot recycle numbers automatically for continuous number sequences. You can run the cleanup process manually or automatically to recover the lost numbers. Take a look at this article that describes how to recover missing purchase orders number with the cleanup…
Our customers may requires to control Workflows to avoid creator approval on documents submitted to workflow. This could be controlled by the system where set Disallow approval by submitter control as Yes. You can find this control under System administration| Workflow| Workflow parameters (see screen below) Assume that the same user creates an invoice and normally he is the one…
Here you can find the learning path to gain the skills needed to become certified for Exam MB-320: Microsoft Dynamics 365 Supply Chain Management, Manufacturing : https://docs.microsoft.com/en-us/learn/certifications/exams/mb-320 Once accessed the page go in the “Online – Free” section and start you learnings
Here you can find the learning path to gain the skills needed to become certified for Exam MB-310: Microsoft Dynamics 365 Finance : https://docs.microsoft.com/en-us/learn/certifications/exams/mb-310 Once accessed the page go in the “Online – Free” section and start you learnings
Here you can find the learning path to gain the skills needed to become certified for Exam MB-700: Microsoft Dynamics 365: Finance and Operations Apps Solution Architect : https://docs.microsoft.com/en-us/learn/certifications/exams/mb-700 Once accessed the page go in the “Online – Free” section and start you learnings
In this example you need to modify the dashboard to start in a specific company and to use the following settings : – Country: France– Time zone: Paris– Language: French To do that follow these instructions : 1. Click the Gear icon in the top right corner of the page.2. Select User Options from the…
Example Case : The pallets used by a company can contain 12 boxes.You need to create a unit of conversion for the boxes. You need to create a unit of measure for the pallet and another unit of measure for the box (if they don’t already exist). Then you create a unit conversion. Create a…
1. Navigate to Accounts receivable > Setup > Accounts receivable parameters. 2. Click the General tab.3. Expand the Customer Approval section.4. Click the slider named Enable customer approvals to Yes.5. Select the entities for which you wish to enable customer approvals.
1. Go to Navigation pane > Modules > Accounts Receivable > Setup > Forms > Form setup2. On the General tab, click the Print management button. 3. In the documents list, expand Customer invoice and select Original <Default>.4. In the Destination field, select Printer setup.5. In the Print destination settings windows, select File.6. Select PDF…
Custom formatting string in .NET makes it really easy. This code achieves this output Datetime in GMT: 20211105_113052
If you are trying to deploy a class library project from Visual Studio to AX server and facing this error : Error 1 Unable to hot-swap the revised assembly to the server. If this is a test or development installation, configure the server to enable hot-swapping. 0 0 ITStaging it means you must enable the…
If you’re facing this warning message means you’re exeeding the limit of infolog message. Default limit of Infolog messages is 10000, but you can change the value of MaxErrors macro in viewBuild() method of Info class (like shown below).
This article contains many examples on How To Use Forms Advanced Filter : https://dynamics-tips.com/how-to-use-advanced-filter-d365-finance-and-operations/
Some other notable simple query syntax is the range syntax which is just two periods “..”. This represents a range between two values. For example, in a date field you could use it query for customers that have a customer since date between “9/21/2020” and “9/25/2020”. This is the syntax 9/21/2020..9/25/2020
If yoou want to save last used Query on a RunBaseBatch class just set TRUE the QueryRun.saveUserSetup() method like show in the example below This code will enable the “Previously used Query” option while opening the Select Form dialog like shown below
You can only retrieve 1, 10, 100, 1000 records from a select statement using firstonly syntax (like shown below) while select firstonly100 rent order by PostedDate desc where (rent.PostedDate > td && rent.RentalOrderStatus == z_RentalOrderStatus::Posted) || rent.RentalOrderStatus == z_RentalOrderStatus::Approved { info(“orders”); } If you want to get different number of rows you can implement a…
You can use DateTimeUtil::getSystemDateTime() method to extract current system DateTime with hours, minutes and seconds. It will return date in this format : 01/11/2021 15:42:23
Here you can find the complete X++ Date runrtime functions : https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-date-run-time-functions
These are the mode in which the file should be opened. Specify one the following:R – ReadW – WriteA – Append (implies “W”)T – Translate (text)B – Binary
Microsoft has added some additional new security reports that can be accessed through the web application. These can be found by going to System Administration -> Inquiries -> Security. Under this section you will find four reports: User Role Assignments Security Role Access Role to User Assignments Security Duty Assignments To investigate which user roles…
This article described how to Grant Access to a form and View current form security objects with SECURITY DIAGNOSTICS TOOL : https://community.dynamics.com/365/financeandoperations/b/howtodynamics365/posts/how-to-view-security-diagnostics-for-page-in-dynamics-365
This article describes how to change the dashboard banner or logo in D365FO: http://blog.congruentsoft.com/change-the-dashboard-banner-or-logo-in-d365-finance-and-operations/
Here you can find the learning path to gain the skills needed to become certified for Exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer : https://docs.microsoft.com/en-us/learn/certifications/exams/mb-500 Once accessed the page go in the “Online – Free” section and start you learnings
Here you can find the learning path to gain the skills needed to become certified for Exam MB-300: Microsoft Dynamics 365: Core Finance and Operations : https://docs.microsoft.com/en-us/learn/certifications/exams/mb-300 Once accessed the page go in the “Online – Free” section and start you learnings
This is the example to split datetime in hour minutes second in different timezone
Find all records where the ItemType is Service, or both the ItemType is Item and the ProjCategoryId is Spares. This is not possible to achieve using the standard range syntax. This example shows how to do that Note also that in this example, we are using the fieldStr() method to specify our actual field names…
To show or hide the Select button on a RunBaseBatch class add the “showQuerySelectButton()” method and return true to how to show or false to hide
Step 1: Create a runbasebatch class with all the needed methods Step 2: Override the initParmDefault() method Step 3: In Run method you can apply your logic
Hi, In AX 2012 onwards typeId() is replaced with extendedTypeStr();
Create a new shortcut. Type your visual studio client path in the browse textbox ( for example “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe”), add /AXConfig parameter and add your .AXC file path (for example “C:\Users\Public\Desktop\R3 Icone AX\SVI\SVIR3_CUS.axc”). If you don’t know hot to create an .AXC configuration file follow this guide Final shortcut command will…
This article will guide you through the steps to create a new AX client config file for a specific layer in AX 2012 R3. 1. Click Start > Administrative Tools > Microsoft Dynamics AX 2012 Configuration to open the Microsoft Dynamics AX Configuration Utility. 2. Click Manage > Create configuration. The Create Configuration window is displayed. 3. Enter a name for the configuration, and then click OK.…
In this example we delete the usage data for Class called “TaxReport” of the current user.
If you need to get the current user id use this function :
Original document from Microsoft documentation : https://docs.microsoft.com/en-us/dynamicsax-2012/developer/methods-on-a-form-data-source Each form data source has a set of standard methods. You override these methods when you want to change the behavior for validation, caching, and so on. These methods are a subset of the methods in the FormDataSource system class. You use the AOT to access the standard…
Click on this Microsoft documentation to add filter controls to a simple list form in AX2012 : https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-add-filter-controls-to-a-simple-list-form
During development we have to create custom inquiry forms. Or Form where we can search and filter records on different criteria. Consider a scenario, where we have to build custom inquiry form for all saleline. In this inquiry or custom list form, we can filter on records on date, customer and amount or discount. Lets…
This section describes a comparison of the ternary statement to the if statement.
“If the permission node under the design of the SSRS report seems OK you can try to export and re-import the SSRS report by XPO. For me, it solved the problem (on AX2012 R2 CU7) without having to add any permission on roles or privileges. Under the hood, we found out that re-importing the report…
This article describes how to call an external Web Service from X++ in AX 2012 : https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/walkthrough-calling-an-external-web-service-from-x
This article describes how to Create Application user in Azure for use in Dynamics 365 :
There are 2 ways to retrieve roles of a Duty. The first is by going in AOT, the second is to do a SQL Query. First Approach : Open AOT under the node Security –> Duties Then search your duty, right click on it and go into Add-Ins –> Security tools –> View related security…