AX / Dynamics 365 For Finance and Operations blog

  • Contacts
  • Articles
  • Categories

Ultimi articoli

←Previous Page Next Page→

  • AX / D365FO – Disable best practice rules while compiling in Visual Studio

    5 April 2023

    By default Visual studio has several build rules, including best practice checking. Very often it signals you that you need to write method documentation or comment your lines of code. We don’t always want this to be reported to us, so if we want to disable these warnings we need to disable this setting.To do…

    System Administration, Visual Studio, X++

  • AX / D365FO – Team Build Error: The Path … is already mapped to workspace

    20 March 2023

    On the File menu, point to Source Control, Advanced, and then click Workspaces…. In the Manage Workspaces dialog box, tick the Show remote packages checkbox. Under the Name column, select the workspace that you want to remove, and then click Remove. In the Confirmation dialog box, click OK.

    Visual Studio

  • AX / D365FO – COnverts String in Upper case

    15 March 2023

    Use strUpr to convert string in upper case in x++

    AX – D365FFO, X++

  • SQL SERVER – Troubleshoot high-CPU-usage issues

    10 March 2023

    Good article that helps you to find the causes of high CPU usage in SQL SERVER : https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/performance/troubleshoot-high-cpu-usage-issues

    SQL Server

  • AX / D365FO – How to do an Inventory recalculation for on-hand Qty

    9 March 2023

    Sometimes you may see some discrepancy in InventSum table for any item then you may need to recalculate inventsum for particular item. You can try in 2 different ways : With D365FO User Interface Go to System administration > Consistency check Choose : The job will process all the InventSum Items so it could take…

    Inventory Management, On-hand Quantity, User Interface, X++

  • AX / D365FO – Clear Work user sessions on Warehouse Mobile app

    1 March 2023

    Sometimes it may happen that the session of a user logged into the Warehouse mobile app remains blocked or an error prevents you from working. What you have to do in these cases is to close the user’s session.To do this, follow these instructions : Go to : Warehouse management > Inquiries and reports >…

    AX – D365FFO

  • AX / D365FO – X++ exception handling

    28 February 2023

    Nice post that explains hoew to manage exceptions in X++ : https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-exceptions

    Error exceptions, Errors/Issues, X++

  • AX / D365FO – Configuring Batch job e-mail Alerts

    28 February 2023

    To configure Batch jobs processing e-mail alert you must : Configure D365FO E-Mail parameters Go to System Administrator > Setup > Email > Email parameters Configure your SMTP Server Settings and insert a Sender Email user Set your e-mail Address in D365FO Go to User options > Accoutn and set : Set the Batch job…

    AX – D365FFO

  • SQL SERVER – Update top n records in sql server

    27 February 2023

    This code willupdate first 100 rows of your table

    SQL Server

  • SQL SERVER – How to get last char in a string in sql server

    27 February 2023

    This will give “c” as result

    SQL Server

  • AX / D365FO – Get Current Company in AX

    25 February 2023

    Company / DataAereId, X++

  • AX / D365FO – Send email in X++ using email templates

    24 February 2023

    Nice post that describes how to send e-mails using e-mail templates : https://dynamicsaxinsight.com/2019/01/30/d365-send-email-in-xpp-using-email-templates/

    Email Templates, Emails, X++

  • AX / D365FO – Convert UTCDateTime to Date

    24 February 2023

    In this example I will convert UTCDateTime type into Date type

    Date functions, X++

  • AX / D365FO – Set a default value of a table field when creating a new row

    23 February 2023

    Setting default values for table fields in Microsoft Dynamics AX and Dynamics 365 Finance and Operations (D365FO) is a common requirement. It enhances data consistency and reduces the need for manual input. In this article, we’ll explore how to set a default value for a table field when creating a new row using the initValue()…

    AX – D365FFO, Tables, X++

  • AX / D365FO – Get current user email

    22 February 2023

    Get the current logged user e-mail

    Emails, Users, X++

  • AX / D365FO – Create a new Purpose for Address or COntact

    22 February 2023

    To create a new purpose go to Organization administration > Global address book > Address and contact information purpose Click New To add a new purpose, click New, and then enter the name of the purpose and a brief description. Then select the Postal address or Contact information check box to specify whether the purpose is used for address records…

    Address book, Global Address book

  • AX / D365FO – Split string into Array

    21 February 2023

    I have a text that which contains comma separated values and I want to insert values into an array. You can use strSplit() method to do this

    Array, X++

  • AX / D365FO – Creating Email Body with Dynamic Table (with Docentric free edition)

    21 February 2023

    With Docentric AX Free Edition you can: Read this article to learn how : https://ax.docentric.com/improved-email-templates-creating-email-body-dynamic-table/?toolbarclose=yes

    Docentric, Email Templates, Emails, X++

  • AX / D365FO – Remove spaces from Text in Ax (TRIM)

    21 February 2023

    To Remove spaces from Text you can get idea from below code sample. Here we are update name fields which include spaces on right and left side .

    Trim, X++

  • AX / D365FO – Error : “Connection is busy with results for another hstmt” while executing a stored procedure

    18 February 2023

    With AX you have the ability to execute stored procedures directly from X++ code The benefit is greater speed in query execution and flexibility in building complex queries. See this post to learn more about the topic : https://dynamicsaxgyan.wordpress.com/2020/03/06/create-and-execute-stored-procedures-in-d365-fo-x/ I recently encountered this error in a procedure that executes a SQL stored procedure : “Connection…

    SQL Statements, Stored procedures, X++

  • AX / D365FO – How to : “Serialization version mismatch detect, make sure the runtime dlls are in sync with the deployed metadata D365 For finance and operations”

    17 February 2023

    I got this error after made some changes to a report Error : Serialization version mismatch detect, make sure the runtime dlls are in sync with the deployed metadata D365 For finance and operations To solve the issue just make a full rebuild of your custom model

    AX – D365FFO, Reports, SSRS – sql server reporting services, X++

  • ax / d365fo – Adding Barcode to a Report

    17 February 2023

    First, create a method like the following either on your Report element or in the relevant Section. Note the BarcodeType enumeration that provide you with options other than 128. Then, add a String control to your report and use your new method as the data method.  You could also have attached the display method directly…

    Barcodes, Reports, SSRS – sql server reporting services, X++

  • AX / D365FO – How to : “The class or interface does not exist ax”

    16 February 2023

    Are trying to use a class that belongs to another model and you face this error : “The class or interface …. does not exist” Don’t worry this happens because you forgot to reference the model in your custom model. To solve the issue follow these steps : Go to Dynamics 365 > Model management…

    AX – D365FFO, X++

  • AX / D365FO – How to clear a date field in X++

    13 February 2023

    To clear a date just use datenull() method

    Date functions, X++

  • SQL Server – Row Count for all Tables in a Database

    12 February 2023

    Are you loiking for a SQL SERVER query that gives you an overview of how many row has every single database table? Look a this

    SQL Server

  • AX / D365FO – Group by and Aggregate functions on select statement

    12 February 2023

    Thiis simple code shows how to do a Query using a select statement with GROUP BY clause and Aggregate functions like COUNT, SUM, AVG, etc..

    Group by, Query, select statement, X++

  • SQL SERVER – Format numbers in SQL Server

    12 February 2023

    Nice post that describes how to use SQL SERVER function to format numbers : https://www.mssqltips.com/sqlservertip/7021/sql-format-number/

    SQL Server

  • SQL SERVER – Format Dates with FORMAT Function

    12 February 2023

    Nice post that describes how to fomat dates in SQL SERVER https://www.mssqltips.com/sqlservertip/2655/format-sql-server-dates-with-format-function/

    SQL Server

  • SQL SERVER – COnvert Datetime to Date

    12 February 2023

    This simple script Convert current datetime to Date removing hours, minutes, seconds

    SQL Server

  • SQL SERVER – Add or remove days to a Date

    12 February 2023

    Add or remove days to a date

    SQL Server

  • SQL SERVER – Automatically Defrag indexes based on a given fragmentation percent

    12 February 2023

    This script performs a reorganization of the indexes of the tables that have a percentage of fragmentation greater than a number that you can decide

    SQL Server

  • SQL SERVER – Execute dynamic SQL

    12 February 2023

    Dynamic SQL commands using EXEC Statement

    SQL Server

  • SQL SERVER – Reorganize all indexes in a table

    12 February 2023

    The following example reorganizes all indexes on the HumanResources.Employee table in the AdventureWorks2016 database.

    SQL Server

  • AX / D365FO – Summarized values / Aggregation fields in a Form with QueryRun Object

    11 February 2023

    Do you want to use QueryRun object but not able to show summarized values (like SUM, COUNT, etc) as a result? Look at this article, it will give all the answers https://dev.goshoom.net/2015/11/summarized-values-in-ax-form/

    AX – D365FFO, SQL Statements, X++

  • AX / D365FO – Override The JumpRef method On A Base Form with Chain of command

    9 February 2023

    I want to override the standard behaviour when I click on CustTable_tutStoreId control of my CustTable Form First create an extension class of your form and create a new method tutStoreIdJumpRef Then override Init() method by using registerOverrideMethod()

    JumpRef method, RegisterOverrideMethod, X++

  • AX / D365FO – How to get value of FormReferenceGroupControl

    9 February 2023

    To get the RecId of the FormReferenceGroupControl To get the Display value which is substituted to the user instead of the underlying RecId value stored in the database, do this:

    Reference group, X++

  • AX / D365FO – Hide a control in a Form by extension

    8 February 2023

    I need to hide a form control.The form in question is the whsloadtable (All Loads) and the field is the Shipping Carrier To hide it I can use event handlers so I enter the WHSLOADTABLE Form, open the datasource, click on “Events” and right-click on the “OnActivated” event. Then click on “Copy event handler method”…

    Forms, X++

  • AX / D365FO – How to get TABLE ID in Dynamics 365 for finance and operations

    5 February 2023

    Table Id can be found SysTableIdView.  in Dev environments, you can do direct query on sql server. select * from SysTableIdView

    Tables

  • SQL SERVER – Remove Milliseconds from Datetime in T-SQL

    4 February 2023

    SQL Server

  • SQL SERVER – Get records from last hour

    3 February 2023

    This code shows how to get records for the last hour.

    SQL Server

  • SQL SERVER – How to see query history in SQL Server Management Studio

    31 January 2023

    This simple query shows the query history logs of the SQL DB

    SQL Server

  • AX / D365FO – Simple Class to perform database sync for a single table

    25 January 2023

    This simple runbase class is a ready-to-use tool to perform a Database synchronization for a single table Through X++ code we can perform database synchronization either on a required table (or) on all tables bases on our requirement. This could be very useful during on-premises environments package deployments because can can drastically reduce the downtime. In fact you can only synchronize the tables…

    Database synchronization, X++

  • AX / D365FO – Perform database synchronization for a single table in X++

    21 January 2023

    Through X++ code we can perform database synchronization either on a required table (or) on all tables bases on our requirement. This could be very useful during on-premises environments package deployments because can can drastically reduce the downtime. In fact you can only synchronize the tables that you have actually modified rather than perform an…

    Database synchronization, X++

  • SQL SERVER – Remove special characters from string

    20 January 2023

    Simple function to remove special characters from a string Now just execute the function to remove special characters It will give you this result

    SQL Server

  • SQL SERVER – Get numeric values from string

    20 January 2023

    Simple function to get numeric values from a string Now just execute the function to obtain numeric values from a string It will give you this result

    SQL Server

  • AX / D365FO – How to add enum filter with “All values”

    15 January 2023

    Sometimes customers request a specific filter in a form. The filter is based on an enum and must have All element to display all records regardless of field value. For example, a filter has 3 elements: All, Quotation, Order; although enum has only 2 elements: Quotation, Order. To achieve the result you need to add a ComboBox control in codeThe algorithm is the following:–…

    ComboBox, Enums, Forms, X++

  • AX / D365FO – Get value from Form ComboBox

    15 January 2023

    In MyForm I have a ComboBox (myComboBox) with EnumType myEnumType. I want to get its value. To get the value of the ComboBox use the selection method

    ComboBox, Enums, Forms, X++

  • AX / D365FO – How to get values of base enums using code in x++

    14 January 2023

    Enums, X++

  • AX / D365FO – Disable Auto execute Query on form startup

    13 January 2023

    Do you have a form that takes a long time to open?This is because when it opens, the ExecuteQuery command is immediately executed, which executes the query on the database. If the query is very slow you will have to wait a long time. To solve the problem you can disable the automatic execution of…

    Forms, Query, X++

  • AX / D365FO – “NOT EXISTS” join on an AOT Query

    11 January 2023

    If you need to create a relation between 2 tables using a NOT EXISTS JOIN on an AOT Query you can use the join mode property

    AX – D365FFO, Query, Query joins, select statement

  • AX / D365FO – Add CreatedOn, CreatedBy, ModifiedOn, ModifiedBy fields on a Table

    5 January 2023

    Do you want to know when a table record has been created or modified? Or better know who has created it or modified it? You can do it by enabling these properties on a Table object : These fields will be added on your table

    Tables, X++

  • AX / D365FO – How to Hide Enum values on a Form Lookup x++

    4 January 2023

    Suppose you have a Form with an enum control ABC which contains values A,B,C. you want to hide last value of enum “C” while displaying it on the form. You have 2 ways to reach the result : Override the “Run” method in your Form (Preferred solution) Override the “Enter” method of that enum control…

    enum2Str, Enums

  • SQL SERVER – Find Index Fragmentation status using the T-SQL statement

    27 December 2022

    Use this SQL statement to fnd fragmented indexes

    SQL Server

  • AX / D365FO – OR Condition in a Query Range object

    20 December 2022

    Do you want to add an OR Query condition like (Field1 > 0 or Field2 >0) inside a complex AX SQL Statement using a Range object? Follow these steps : For this example I will use InventSum Table Add a range in the Data source Name it PhysicalInvent (no matter what’s the name it’s just…

    Query, Query ranges, X++

  • AX / D365FO – Clear infolog messages

    10 December 2022

    To clear all infolog messages of a form just use infolog.cut() command. To get more details about this functionality you can read this article https://www.codecrib.com/2011/10/get-infolog-details-from-code.html

    infolog, X++

  • AX / D365FO – HOW TO SET QUICK FILTER IN D365 F&O

    5 December 2022

    Here we will see couple of important property which needs to be filled for Filter to work. In Quick Filter control property 1.Target Control Property – Where we need to choose the Grid Control. 2.Default Column Property – Choose your desired column in Grid Without these set Filter wont work or list any columns. The…

    X++

  • AX / D365FO – SQL queries to get customers and vendor addresses and contact details

    11 November 2022

    Below are the sample queries to get the vendors and customers addresses and contact details. Change the code according to your requirement. All VendorsSELECT * FROM VENDTABLE WHERE VENDTABLE.DATAAREAID=’CEU’ All Addresses – Vendor SELECT * FROM  DirPartyPostalAddressView  JOIN VENDTABLE ON  DirPartyPostalAddressView.PARTY =VENDTABLE.PARTYWHERE VENDTABLE.DATAAREAID=’XXX’ All Addresses with PurposeSELECT LOGISTICSLOCATIONROLE.*,DirPartyPostalAddressView.*,VENDTABLE.* FROM  DirPartyPostalAddressView  JOIN VENDTABLE ON  DirPartyPostalAddressView.PARTY =VENDTABLE.PARTYJOIN DIRPARTYLOCATIONROLE…

    Customers, Vendor

  • AX / D365FO – How to : Renew a Windows license on a D365FO development VM

    9 November 2022

    If your Windows license is about to expire you can renew for other 180 days by calling “Slmgr /rearm” command on a COnsole prompt windows

    X++

  • AX / D365FO – How to find relation between Invoice and Packingslip

    3 November 2022

    Are you trying to find the link between customer invoice and delivery note? This SQL query will show you how

    Customer Invoices, SQL Statements, X++

  • AX / D365FO – Refresh Cache by code X++

    22 October 2022

    If a class is not appearing, you can run a refresh of the cache by code by creating a job that runs: SysExtensionCache::clearAllScopes() or you can run the object using the url: https://xxxx.sandbox.ax.dynamics.com/?cmp=dat&mi=SysClassRunner&cls=SysFlushData

    X++

  • AX / D365FO – Conditional ‘Where’ Clauses in ‘Select’ Statements

    13 October 2022

    Ever found yourself in a situation where you conditionally want to apply a ‘where’ clause in a select statement in Dynamics AX? Here’s how you can do it: There are several scenarios we run into everyday where we are writing a select statement to query data but we only want to apply the ‘where’ clause…

    select statement, X++

  • AX / D365FO – Preserve form query filters after explicit executeQuery call on a data source

    2 October 2022

    Have you ever noticed that when you explicitly call DataSourceName_ds.executeQuery() it reinstantiates the queryRun of the form and thus removes all the query filters (not ranges!). This article explains ho to preserve form query filter throught Extension after explicit ExecuteQuery call on a data source : https://community.dynamics.com/365/financeandoperations/b/elandaxdynamicsaxupgradesanddevelopment/posts/preserve-form-query-filters-after-explicit-executequery-call-on-a-data-source-helper-class-included

    Data source, Forms, X++

  • AX / D365FO – Get datasource from a Form extension class

    28 September 2022

    At Form Level At FormDataSource level At Form Datafield level At Form DataControl level

    Data source, Extensions, X++

  • ax / d365fo – cACHING A DISPLAY METHOD

    28 September 2022

    To improve the performance of a display method you can cache it by using the SysClientCacheDataMethodAttribute This example shows how to use it

    Display method, X++

  • SQL SERVER – Use Change Data Capture for track table changes

    25 September 2022

    This article explains how to enable Change Data Capture to trigger/track Tables changes https://www.sqlshack.com/change-data-capture-for-auditing-sql-server/

    SQL Server

  • SQL SERVER – Find where specific table or view is used in SQL Server database

    21 September 2022

    SQL Server

  • AX / D365FO – Enable Database log for custom tables

    19 September 2022

    Go to System Administrator >> Setup >> Database log >> Database log setup Click “New” and Database logging Wizard will start Click “Next“ Enable “Show al tables” and “Show table names” checkboxes You’ll find all your custo tables inside the “Not specified” tree Choose the tables you want to log and go on…

    AX – D365FFO

  • AX / D365FO – Set the session inactivity timeout

    7 September 2022

    The session inactivity timeout setting represents the amount of time a user can be inactive before the user’s session times out and closes. It only affects user browser sessions. You can set the values from 5 minutes to 60 minutes. This function has a default value of 30 minutes. You can set the value up…

    AX – D365FFO, System Administration

  • SQL SERVER – Auto Generate INSERT Statements For A Table In SQL Server

    5 September 2022

    To generate insert scripts for inserting data to a table on production environment or populating a test environment database follow this procedure In SQL Server Management Studio (SSMS), there is an option to easily auto generate insert statements on the fly. Below are the steps to generate insert statements using SSMS. In SSMS Object Explorer, right-click the database.…

    SQL Server

  • SQL SERVER – How to increase the maximum number job history logs

    28 August 2022

    By default the maximum number of logs stored in the SQL SERVER Agent history is 100 All the previous jobs stored after that value are automatically deleted If you need to store more logs in your history follow these instructions : In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand…

    SQL Server

  • SQL SERVER – HOW TO : TEMPDB won’t shrink even if there is unused space available

    28 August 2022

    It could happen that the TEMPDB grows and even if you try to shrink it the size does not decrease. The problem could be caused by cache data not being cleared. In this cases you could use some commands that clear these cached data. Read this article to understand what you can do in these…

    SQL Server

  • SQL SERVER – Create an Alert for TEMPDB Growing out of control

    27 August 2022

    The system database TEMPDB can appear to have a life of its own. The primary purpose of this database is to temporarily store data for specific processes before being committed to a database. When a Tempdb grows out-of-control it can be a daunting task trying to figure out what is causing the growth. This can…

    SQL Server, SQL Statements

  • AX / D365FO – FIlter an AOT Query by multiple Enum types fields

    26 August 2022

    Are you creating an AOT Query and want to create a filter condition by multiple ENUM types field? In the AOT query you can do it by using a data source Range object and separate value by comma In the value field property just insert the numeric or string value of the the ENUM fields. In this example I…

    AOT, Enums, Query, Query ranges, X++

  • AX / D365FO – Change the banner or logo for a TEST Environment

    21 August 2022

    Go to Navigation pane > Modules > Organization administration > Organizations > Legal entities. In the list on the left, select the legal entity for which you want to update the banner or logo. If it is already selected, go to the next step. Expand Dashboard image tab. In the Dashboard company image type select Logo or…

    AX – D365FFO

  • AX / D365FO – Generate an exception with an error message in X++

    20 August 2022

    To generate an exception in X++ code and give a feedback to the user with an error message just use throw Error(‘Your error message’) Here is an example The code will stop after the exception and a red message will be shown to the user

    Error exceptions, X++

  • AX / D365FO – Create a simple Note on a Table in X++

    19 August 2022

    This example shows how to create a simple note on a Table (ie. SaleTable) The code will insert a new note in the salesTable Form (like shown below) Example code

    Attachments, AX – D365FFO, X++

  • AX / D365FO – Using Aggregate functions (Count, Max, Avg…) in a View

    19 August 2022

    Suppose that you want to create a form that show a list of customers with the total count of their sales orders The result should be something like that.. But how to do that? You just need to follow these steps : Create an AOT Query Create an AOT View linked to the previous query…

    AX – D365FFO, Forms, simple list and details form pattern, X++

  • AX / D365FO – List of all Symbols fonts (Image icons for tiles and buttons)

    18 August 2022

    This document contains a list of the available symbols within Dynamics AX, as well as information and guidelines around the usage of symbols in various locations in the product. The symbol font is used by setting the ImageLocation property to “Symbol” and the Normal Image property to a symbol name listed below. Guidelines for symbol…

    AX – D365FFO, Tiles, Workspaces

  • AX / D365FO – Create a Tile in a D365FO Workspace with X++

    16 August 2022

    There are two ways through which we can create tile one by personalizing form and another through code. In this example we’ll use code The diagram below summarizes the operations we will perform to add a tile to a workspace These are the steps we’ll do : Create an AOT Query object Create a simple…

    AX – D365FFO, Tiles, Workspaces, X++

  • AX / D365FO – Debug Production environment on D365FO On-Premise version

    15 August 2022

    If you have an On-premise D365FO installation it is possible to debug production or test environments by using a development VM and remote debugging tool Just follow these steps : Use a D365 developer environment Use a development environment which is on the domain (and of course the network) with the AOS machine The dev…

    AX – D365FFO, Debug, Visual Studio, X++

  • sql server – Free disk SPACE USING SHRINK

    15 August 2022

    Understanding shrinking the log If you need to recover disk space from the transaction log file, consider shrinking the log file. Shrinking logs helps after you perform an action that creates a large number of logs. You can only shrink the log if there is free space on the log file. Shrink the transaction log…

    SQL Server

  • AX / D365FO – Log “only errors” in Batch jobs History

    14 August 2022

    When you execute a batch job by default the executon is logged in the batch job history. Every execution is logged even if the result is successful. This can be usefull but if the job has a recurrence it can fill the history very quickly If you want to trace only failed executions follow these…

    AX – D365FFO, Batch jobs

  • AX / D365FO – Use a SQL Server function in an D365FO View

    12 August 2022

    Need to add a SQL Server function to make some smart calculation into a D365FO AOT View based on Query? In this example I will show how to do that. I will use the FORMAT date function to convert a simple date in YYYYMMDD format First of all you must have a view based on…

    View, View Computed Column, X++

  • AX / D365FO – Database logging in D365FO

    11 August 2022

    atabase logging in Dynamics 365 Human Resources and Finance & Operations is a history of actions executed by the system, based on CRUD (Create Update Delete). Database logging is needed to track the specific types of changes to the system. The operations that can be tracked with database logging are: insert, update, delete and rename…

    AX – D365FFO

  • AX / D365FO – Clean up the batch job history

    10 August 2022

    When several batch jobs have been created, especially batch jobs that have a high recurrence, lots of batch job history entries are generated. Too many entries in the history table can negatively affect the performance of future jobs. Two pages that have been added to the System administration module make it easy to clean up the batch…

    AX – D365FFO, Batch jobs

  • AX / D365FO – Create index with “Included columns”

    7 August 2022

    If you want to create an Index with Included columns just create the index, add the field and set the “Included column” property to YES

    Indexes, Non clustered index, X++

  • AX / D365fo – Filter by Enum value in an AOT Query

    6 August 2022

    Are you creating an AOT Query and want to create a filter condition by an ENUM field? In the AOT query you can do it by using a data source Range object In the value field property just insert the numeric or string value of the the ENUM field. In this example I used the string value…

    AOT, AX – D365FFO, Enums, Query, X++

  • AX / D365FO – Use Wildcards (..LIKE SYNTAX..) in AOT Query objects

    6 August 2022

    Are you creating an AOT Query and want to use a wildcard filter? An example could be that you want to filter all the items that starts with a specific word. In an ideal world you would use the SQL keyword “LIKE”. In the AOT query you can do it by using a data source…

    Query, Query ranges, X++

  • AX / D365FO – How to test the Query syntax and results of a Query

    6 August 2022

    Have you created an AOT Query and want to check if the syntax is correct and the results are what you expected? You can create a Runnable class like show below When you debug the code you can check the Query syntax by watching inside the queryRun variable

    Query, X++

  • AX / D365FO – How to create automatic join relationship between tables in an AOT Query

    6 August 2022

    Are you creating an AOT query and want to join 2 or more tables but don’t know the relationships between them? No problem! You can use the “Use Relations” property like shown below In this example I want to to use the native relation between InventSerial and InventSum tables (which is InventSerial.ItemId = InventSum.ItemId). By…

    Query, Query joins, X++

  • AX / D365FO – Create a simple SSRS Report based on a Query

    6 August 2022

    First, you need to create a query. Open Visual Studio as administrator. From the File menu, select New > Project. Select Dynamics 365 on the left pane. select Finance Operations in the middle pane. Enter ReportingProject in the Name field. Select OK. In the Solution Explorer, right-click your project node, and then select Add > New Item. Select Data Model and then select Query. For the Name field, enter CustTableQry and then select Add. Open the…

    AX – D365FFO, Reports, SSRS – sql server reporting services

  • SQL SERVER – Concatenates rows fields into a single string with STRING_AGG()

    6 August 2022

    The STRING_AGG() is an aggregate function that concatenates rows of strings into a single string, separated by a specified separator. It does not add the separator at the end of the result string. This example uses the STRING_AGG() function to generate lists of emails of customers by the city: This is the result

    SQL Server

  • SQL SERVER – DROP TABLE IF EXISTS

    6 August 2022

    SQL Server 2016 introduced a simply way of dropping a table with DROP IF EXISTS. Instead of having to look and see if whether or not the table exists with one T-SQL statement then running DROP TABLE if it does, and ignored if not, executing DROP TABLE IF EXISTS will do both for you in…

    SQL Server

  • AX / D365FO – Auto refresh form grid data after pressing menu item

    4 August 2022

    Want to refresh a Form grid data after pressing a menu item? Just set the Form Menu item Auto refresh data Property to “Yes” like shown below

    Forms, Menu item, X++

  • SQL SERVER – enlarge FOnts results in SSMS

    3 August 2022

    From the SSMS Tools menu, choose Options. Then in the search box type ‘FON’, choose ‘Font and Colors’ and from the drop down list labeled ‘Show settings for : ‘ choose ‘Grid Results’. Enlarge the font size. Restart SSMS and your view will be much better.

    SQL Server

  • AX / D365FO – How to identify the SQL Server version and edition

    30 July 2022

    To identify the SQL Server version and edition running on your machine open SSMS, access your Master DB and write the following statement You’ll get a result like that. In my case I have a Developer Edition Microsoft SQL Server 2016 Microsoft SQL Server 2016 (SP2-CU16) (KB5000645) – 13.0.5882.1 (X64) Jan 25 2021 21:40:32 Copyright…

    SQL Server

  • AX / D365FO – SQL Server password for user “axdbadmin” in locally deployed D365 for Operations environments

    30 July 2022

    By default the password for user axdbadmin is AOSWebSite@123

    AX – D365FFO, SQL Server, X++

  • AX / D365FO – How TO find a text inside a stored procedure – SQL SERVER

    29 July 2022

    To search for stored procedures containing a specific text just launch this select statement or better you can try this This will be the result

    SQL Server, SQL Statements

  • AX / D365FO – Unpick a sales order line

    21 July 2022

    To unpick a sales order line select the SO order line in the Sales order form Click on Update line > Pick. In the Pick Issue status shown as “Picked” …select the line, press on “Add picking line” button. Now you’ll se the order line in the panel below with Negative sign (-) … Click…

    AX – D365FFO

  • AX / D365FO – Get packing slip number and delivery date of a sales line in SQL

    21 July 2022

    This SQL statement gets Packing slip number and date of a sales line You’ll get this result

    SQL Statements, X++

←Previous Page Next Page→
  • Subscribe Subscribed
    • AX / Dynamics 365 For Finance and Operations blog
    • Join 158 other subscribers
    • Already have a WordPress.com account? Log in now.
    • AX / Dynamics 365 For Finance and Operations blog
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar