Useful X++ code samples
This repository contains 3 D365FO models:
- DEVTools model
- DEVCommon model
- DEVTutorial model
- DEVTutorialReports submodel
- DEVTutorialIntegration submodel
The DEV prefix is used for all objects.
It contains user X++ tools, with the additional application functionality. Each tool is located in the separate sub-model.
Fields list form is an extended version of the standard Show all fields form with the additional features such as displaying all fields with the extended information, comparing and editing
Full description: Fields list form. Sub-model name: DEVRecordInfo
-Display system field name in the query filter
This utility adds system field name in the standard query filter lookup and in the "Personalize-Add columns" dialog. So you can search the field by Label(as standard) or by AOT name
Full description: Filter by AOT name. Sub-model name: DEVQueryFieldsAOTName
-Display table relation fields
This utility adds additional relation information into Add table join function of the standard Advanced query form(Advanced filter or sort - Joins - Add table join)
Code is based on sukhanchik post on axForum
Sub-model name: DEVSysQueryFormAddRelInfo
-Editable table browser
Extension for the standard D365FO table browser that allows root navigation and editing for non-development environments.
Test link https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=USMF&mi=DEVSysTableBrowser&tablename=custgroup. A user should be in the group "DEV Editable table browser"
Full description: Editable table browser. Sub-model name: DEVSysTableBrowser
-List of Values to Range
This functionality is intended to help users deal with list of values in query range. With help of this tool you can:
- Copy list of values from, for example, excel and paste it in a range;
- Easily manage values of existed range
Full description: List of Values to Range Sub-model name: DEVListOfValuesToRange
-Execute direct SQL in D365FO database
'Execute direct SQL' is a simple form that allows to write and execute direct SQL from the browser on D365FO database.
Full description: Execute direct SQL in D365FO database Sub-model name: DEVSQLExecute
Elements that can be shared between different projects
Collection of global methods
DEVDimensionHelper class contains various methods to work with the financial dimensions.
Description: Working with the Financial dimensions
-Read Excel and CSV files
Description: How to read Excel and CSV files in D365FO using X++
Various X++ examples, that can be used to test something or used as a template. Elements can reference to DEVCommon model objects
-Blocking in D365FO
Form DEVBlockingTest, table DEVBlockingTestTable(to test SQL blocking issues)
-Create ledger journals using X++
Class DEVTutorialCreateLedgerJournal that demonstrates different methods for a ledger journal creation
-Create ledger journal from Excel file
Class DEVReadFromFileExampleCreateJournal - sample code to create a ledger journal from Excel file
-Parallel batch processing in X++
Contains report development examples
-Sales Invoice report
A sample code to Create a new design for Sales Invoice report in D365FO (https://denistrunin.com/xpptools-reportsalesinvoice/)
Contains integration samples
-File-based integration in Dynamics 365 FinOps using X++
A sample code for implementing file-based integration in Dynamics 365 FinOps using X++. Create Ledger journals based on periodic import of Excel/CSV files from Azure storage (https://denistrunin.com/xpptools-fileintegledger/). Test files for Demo database here
Download the Source code from this GitHub repo into the Temp directory on the DEV VM.
Copy DEVTools(or DEVGlobal, DEVTutorial) folder to your package folder (C:\AOSService\PackagesLocalDirectory )
Start Visual Studio and Run compile for the DEVTools folder (Dynamics 365 –Build models.. – Select DEVTools)
If you want to contribute - change the objects using Visual Studio in the DEVTools model, copy the changed elements(xml files) back into the Temp folder and create GitHub pull request from this Temp folder.
Feel free to create issues and PRs