To show the SQL command of a Query builder in an infolog just use the ToString() method like shown in code below The info method will show this result in the form {Query object 37782b80:SELECT * FROM InventTrans(InventTrans_1)WHERE ((StatusIssue = 4))JOIN * FROM InventTransOrigin(InventTransOrigin_1)ON InventTrans.InventTransOrigin = InventTransOrigin.RecIdAND ((InventTransId = N’xxxxxxx’))JOIN * FROM InventDim(InventDim_1) ON InventTrans.inventDimId…
The saved views feature in Dynamics 365 Finance and Operations allows users to save personalizations into sets of views that they can toggle back and forth between. They are excellent to improve user experience and efficiency, but they are not enabled by default, so they cannot be used if none enable them (see image below)…
Are you trying to open an ETL Trace parser file but not able to see the trace log inside it? When you search for your D365FO user you just see an “Unknown user” on “Select grouping” lookup field? The problem is not the “Trase parser” application, but how the file was generated. To generate a…
Number sequences in Dynamics 365 Finance and Operations (Dynamics 365) are used to systematically and automatically generate and manage the unique identifiers for different types records throughout the system. There are a large number of types of records that require a number sequence before the record and be successfully created. Some examples are customers, vendors,…
The Microsoft Dynamics AX cross-reference system allows you to see the relationships between objects. You can see the following: Which other objects use the current object Which other objects the current object uses For example, you can get a list of every piece of code that uses a particular method, or you can see which…
How to know how many rows have been updated in a Update_recordset statement? It’s simple, you can just use rowCount() method of the table after the update statement like shown below
PurchRFQLineMap ( Request for quotation lines 4 )BankGroup ( Bank groups 5 )RFIDProcessStructureTmp ( RFID process structure 6 )BankAccountTable ( Bank accounts 7 )BankAccountTrans ( Bank transactions 8 )BankChequeLayout ( Check layout 9 )BankChequeTable ( Check table 10 )BankDeposit ( Bank deposit 11 )BankTransType ( Bank transaction type 12 )BOM ( BOM lines 18 )BOMCalcTable…
Open development workspace and click on Tools –> Label –> Label editor Search your label by code or description anc click “Used By”. Here you can find all label reference in code
To compare an XPO file with an AOT Object follow these instructions : Apen AOT, choose the object you want to compare and click Import button Choose the XPO file, click on Show Details checkbox, expand the tree, and click Compare button Choose the layout (cus, usr, etc..) you want to compare with XPO and…
Go to AOT -> SSRS Reports Search the report you want to duplicate and export Choose a location for XPO file Open exported file with notepad Change report name with the new name (in my case I added the suffix _ERA in the name) and generate a new GUID (you can use any GUID generator)…
If this error occur : “The business logic assembly ………………, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null does not contain a class for report ………………………………………” just double click on any data method to solve the problem. Then you can deploy your project
Set up training courses : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-courses Questionnaires : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-questionnaires Create questionnaires : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-design-questionnaires Distribute and schedule questionnaires : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-distribute-questionnaires Distribute questionnaires using scheduling : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-distribute-questionnaires-scheduling View and evaluate the results of questionnaires : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-evaluate-questionnaire-results Analyzing questionnaire results : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-analyze-questionnaire-results Create an open ended question : https://docs.microsoft.com/en-us/dynamics365/human-resources/hr-learning-create-open-ended-question
This is the result we want to obtain, 2 dropdown filters that show results into a form grid but disconnected from the form datasource. When the year is selected and month no then the form will show data from 01/01/year and 31/12/year. When the year and month are both selected then the form will show…
To make a resizable form you must open the form, go under Design, search the grid and change the width and height properties to “Column width” and “Column height”
Somethimes it’necessary add a lookup form to a field o extende data type Expected result
First create a new Table “Al0VendorSearchCriteria” AccounNum is take from VendTable.accountNum StatesId is of type Int64 Al0VendorActicivityId is of type Int64 (taken from another custom table that could be seen in my article : https://d365ffo.com/2021/07/04/ax-d365fo-create-a-simple-and-detail-tree-form/ Create a relation betewwn Al0VendorSearchCriteria and Al0Activity Create Extended data types for the 2 fields Add 2 field s to…
If you add a field in a table and want to ad in a form data source you can use “Restore” button
If you want to automatically create a new empty record in a for grid when the form is empty you can set “Insert if empty” property to yes in data grid Otherwise set it ito No and this is the result
Imagine that you must print an invoice and you want to add row numbers next to each item line. This is very simple. All you have to do is to open your SSRS report and a new column Add new Expression Inside the expression add the function RowNumber(Nothing) Now deploy and execute your report. The…
To get a label text in a specific language you can use labelId2String() method of the SysLabel class. If you avoid to specify the language the method will use the default system Language
To get the Customer Primary contact informations like e-mail address, phone number, web site url and fax number you can use these 4 methods
To get the Customer delivery address you can use custtable.mcrDefaultDeliveryPostalAddress() method This example shows how to get a formatted customer delivery address from a given invoice Account
In this simple example I’ll show how add a Table display method as a field of a custom lookup field
Below are the steps to be followed : Create new Design for Report under visual studio Add code to method:\Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populateAdd code before TTSCOMMIT:addOther(PrintMgmtDocumentType::PurchaseOrderInvoice, ssrsReportStr(VendInvoiceDocument, MyReport), ssrsReportStr(VendInvoiceDocument, MyReport), #NoCountryRegionId); Choose you new format under:AP -> setup -> form setup -> Print management -> Vendor invoice -> report format to VendInvoiceDocument.MyReport New Report design can be…
I have a company logo in my report I have a scenario in which a company logo should change according to the company in which I run. How to do that? It is very easy to add the logo. Go to Organization administration > setup > Organization > Legal entities Here you will have Company…
If you want to allow edit only some fields on the form grid control this is an example that shows hot to reach this goal. 1. Create a Form method as below 2. Call the above method from the form Data source Active method after Super() as below
You can just set property “Auto refresh data” of a button to Yes or alternatively via x++ you can use this code
When you export a Data Entity in BYOD the base enums fields values are shown as integer values. This is a big problem because it’s very difficult to understrand the real value of the field. To solve this issue you can extend the standard data entity or modify a custom one using a virtual field…
If you need to extract invoices and related payment voucher numbers you can use 2 Data entities : “Customer payment journal line” or alternatively use “Customer payment journal line settled invoice” Access Data management > Export “Customer payment journal line” Data Entity Select “Customer payment journal line” Click “Export now” When completed click on “Download…
Below code shows how to get buffer from form data source field event handler(modified field) and update values as per the requirement
This example shows hot to change Form datasource field value and call its modified() methods throught X++ code
In Dynamics 365 for Operations you can react to the OnClicked event by copying the event handler method for the event and pasting the method into a class. Below is an example of an event handler method that reacts to the OnClicked event of a button on a form Create new Class and paste below…
This simple job shows how to add 5 minutes to the system UTCDateTime This is the result
Are you using an Action menu item to insert or modify some rows in a From data grid and you want to immediatly refresh grid data to see you changes? It’s simple!! When you add your Action Menu item in form just set the “Auto refresh data” property to YES (like shown below) After the…
This is an example job of how to calculate withholding tax for a Sales order
This is an example job of how to calculate withholding tax for a purchse order
In Electronic reporting if you want to convert an amount into an amount with fixed 2 decimal places after the comma you can use NUMBERFORMAT function Here is an example If the amount is 12.3 then the result will be 12.30 If the amount is 12 then the result will be 12.00
When you create a batch job by default the job is executed by the user who created it. If for some reason the user is disabled by a system administrator (for example because he leaves the company where he works) the jobs stop executing and disappear from the jobs form. In these cases to preserve…
If you want to hide or show an XML element tag depending on a particular condition you can use the “Enabled” button (see below) In this case I want to show the xml element if the customer name is not empty. So enter a condition that returns true if the name is set and false…
If you want to change the company during the code (i.e. in a Runnable class or a job) you can use changeCompany(‘xxx’) command like shown in this example :
If you face this error when trying to view application object hierarchy it means you have to install an option Visual Studio component. You can install it from Tools\Get Tools and Features\Individual components\ Go to Individual components > Code tools > DGML editor and enable it and then enable “Finance and Operations (Dynamics 365)” under…
If you have a report that takes a long time to complete you can consider running it in “batch mode” To reach this result you must call the parmExecutionMode(SysOperationExecutionMode::ScheduledBatch) method in the main Method of the report controller class. For example you can do this But pay attention!! This code forces the report to always…
If you face this error it means that you’re trying to deliver (for sales orders) or receive (for purchase orders) a quantity that differs from the quantity given on the order line. To solve this issue you have to : Enable Overdelivery flag on the modules parameters (Account receivables or Procurement and sourcing) Enabled Overdelivery…
To remove characters in a string you can use strrem() method To replace characters in a string you can use strreplace() method Here are some examples :
To restart a specific service in a deployed environment, follow these steps. In LCS, open the appropriate project, and select the environment to restart the service for. On the Environment details page, select Maintain > Restart services. In the Restart a service dialog box, select the service to restart, and then select OK.The Environment state value is updated when the service is restarted. To view…
XppTools is a very useful custom package that contains facilities to manage D365FO environments like : -Display system field name in the query filter-Display table relation fields–Editable table browser-List of Values to Range–Execute direct SQL in D365FO database-SQL reports-D365FO Infolog call stack-DEVDimensionHelper class–Read Excel and CSV files-Blocking in D365FO-Create ledger journals using X++-Create ledger journal…
Export a Model We ca use ModelUtil.exe, is a tool located in the path K:\AosService\PackagesLocalDirectory\Bin, where K drive could be different if you are not in a cloud environment. Export the model store from the source environment open a cmd with Administrative Privileges and navigate the path of ModelUtil.exe, now run this command: Example Delete…
This example shows how to merge a ledger dimension coming from one place with a default dimension from another place. This could be the ledger dimension in a ledger journal line we need combined with a default dimension from customer. Follow this code to reach the goal :
Imagine that your requirement is to write an XML file with some nodes inside, but in a specific case you must remove all the child nodes of a Parent node you have already written. Something like that: If you want to remove all child nodes of a parent node in an XML file you can…
We want to create an XML file with : a namespace in the first element. an XSI prefix for XML elements attributes Desidered output
We want to create an XML file with : a namespace in the first element. a prefix for every XML elements a prefix for XML elements attributes Desidered output : So let’s see how to do that in X++ If you don’t want to write the XSI prefix before each XML ELement just write this…
By default in D365FO a form is not immediatly editable. If you want to edit you first have to click on “Edit” button in the top left of the screen (like shown below) If you want a form to be immediatly editable you must open “Options” property and click on “Always open for editing”. Next…
Great news!! AX2012 jobs are back in D365FOThis means you can run x++ custom script in Production environment without any downtime.The feature will be available in 10.0.25 service update. Look at this post for more details.
To attach a document in XML electronic invoices just follow these steps : In this example we’ll create an Project e-invoice First be sure the customer has these 2 flags enabled in the E-INVOICE section :– eInvoiceregister– einvoice attachment Now create a Project Create an item requirement order Post the Packing slip Return to the…
This is an example of “Table of contents” form. This kind of pattern is very useful to store parameters data. Let’s see how to create a new one. Create a new Form in Visual Studio Apply “Table of contents” pattern Give it a name (eg.Parameters) Add new Tab Add new Tab Page Add new Group…
The D365FO excel add-in is a very powerful tool that helps users to manage environment entity data to work better and faster. Document templates comes out with many editable entity field columns, but not all of them are available. If you want to add more fields you have to modify the original template. These are…
This is a Simple list form and it’s the final result we want to obtain Here are the steps to create a Simple List Form in D365FO Right click on VS Project and Add new item Click on Dynamics 365 Items > User Interface > Form > Insert the Form name > Add Right click…
Register a new ER LCS Repository To create a new Electronic reporting LCS Repository you must login to D365FO portal with an Administrator Account. Go to Organization administration > Workspaces > Electronic reporting. In the Configuration providers section, select your configuration provider tile. Select Repositories.You can now open the list of repositories of your configuration provider. Select Add to open the drop-down…
Want to know who is currently logged into the system? It’s simply, go to “System administration” > “Online users” Here is the list of all online user.Here you see : User ID User name Status (“Running” means user is online) Login date and time
If you’rre getting this error while importing a derived Configuration, pay attention that the derived base configuration and the Parent configuration are the same version otherwise you’ll get the following error : Reference of the object ‘XXXXXX’ to the object ‘Base’ ({XXXXXXGUIDXXXXX},9) cannot be established To solve this error simply rebase the derived configuration to…
When you access a new development virtual machine (Tier 1) your user cannot access the D365FO environment. To access you must be an Administrator. To become an Administrator you can use “AdminUserProvisioning” tool. Follow these steps to get it : Login to your VM Open IIS Manager Go to “Sites” > Right click on AOSService…
To pause updates, follow these steps. In LCS, in your implementation project, open the Project settings page.This page has a new tab that is named Update settings. Select the Update settings tab in the Pause Updates section, and then select Pause upcoming update. In the dialog box that appears, select whether you want to pause updates to your production environment only, or to…
Are you going crazy to find the Data Entities related to a specific table? Unfortunately you cannot do it from D365FO user interface but only from Visual Studio These are the steps to achieve the goal : Open Visual Studio Open the table you need to search the related Data Entity and click on “Find…
Do you have an existing ER format and you want to change the source mapping model? It’s simply! Just access “Electronic reporting” > choose your format > click on “Designer” Click on “Mapping”> choose your model > click on “Edit” Now you can change the “Model” and the related “Definition“
Have you created a new table or view and cannot see in the “Table” data source list view? That means you have to refill the list. To do that just press “Refill Table” button, wait a few minutes and the table will appear
In Electronic Reporting you can easily format a Date or DateTime using DATEFORMAT() or DATETIMEFORMAT() Here is an example of how to use it DATEFORMAT needs 2 input parameters : Date (or dateTime in case of DATETIMEFORMAT) format (which is the output conversion format) Code below shows how to convert current date in yyyyMMdd format…
How to get the Legal Enity name in Electronic reporting? It’s easy.. there is a predefined function called “GetCurrentCompany()“. You can find it in the formula editor.
By default the name of the electronic reporting output file is made up of : “UserId”+ fixed string “.out”. We can change this name in a static or dynamic way. In my case I prefer to set a unique name. For example consisting of : a static prefix (eg. PriceList) + LegalEntity+ execution date /…
In LCS you can send a message to online users to warn them that it will not be possible to log into the system in view of an upcoming update. Check online users Login to D365FO portal Go to “System administration” > “Online users” Here is the list of all online user.Here you see :…
When you associate an Electronic reporting Data Model to a Data Source Table or View you can decide to extract Cross-Company data. When defining the data source just enable “Cross-company” Property
Create the AOT Query object First of all you must create an AOT Query Open Visual Studio and Add a new Query Item Add new Data source Set Query properties Dynamic Fields > to automatically include all Table fields choose “Yes”, otherwise chose “No” to select fields manually Table > choose the table of query…
In this example I will create a new computed column that sjows the FromDate field of the PriceDiscTable in a YYYYMMDD format Open the view and add a new string computed column Give it “FromDateStr” name Now create a new method The method must be private static server str fromDateformat() Now return to the computed…
Good post that explains how to create an AOT view in D365FO > https://community.dynamics.com/365/financeandoperations/b/howtodynamics365/posts/how-to-create-view-in-dynamics-365
Have you just created an electronic reporting report in a development environment and want to upload it to another environment without doing it from scratch? The correct way is to share the data model in LCS, but for testing purpose I’ll prefer to expor t the model definition using an XML configuration file. So let’s…
Electronic reporting (ER) text functions can be used to perform operations on data sources of the String data type. This topic provides a summary of these functions. > https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/er-functions-category-text?toc=/dynamics365/commerce/toc.json
Electronic reporting (ER) type conversion functions can be used to convert values between types. This topic provides a summary of these functions > https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/er-functions-category-type-conversion?toc=/dynamics365/commerce/toc.json
If you get this error while executing an electronic reporting report : “Application specific parameters are not set correctly for the configuration.” it means that you have configured specific parameters of an ER format per legal entity but not not so well… This problem usally occours when the the specific parameters of a format version…
Are you developing an ER Report but when you try to execute it you can’t find the “Records to include” tab? (picture below) Answer is simple! When you created the data source you forgot to enable the “Ask for Query” checkbox (picture below) So now return to your data source and change this parameter. You…
Open LCS Select “All projects” tab Select the project to be deleted and click on “Delete” icon Confirm that you are sure to delete the project
Box Class Methods The following table describes the Box class methods and their associated DialogBoxType system enum values. Box class static method name Associated DialogBoxType enum value Description info InfoBox The OK button is the only one that the info method displays in the dialog box.Use this method to display general information messages rather than for warning…
Very well done Youtube Azure Devops video course : https://www.youtube.com/playlist?list=PLkLerKPSoQ_M1kA_FzK1106ZsJdSZFIhp
When we try to pusj a D365FO nuget package in devops it may happen that the load times out because the loading time has exceeded the time limit of 300 seconds. In this case, to solve the problem it is sufficient to raise the time limit to a higher value (for example 1000 seconds). To…
In X++ the prmIsDefault () let us know if a method’s input parameter variable has been set at runtime or not. If it’s been set at runtime prmIsDefault () returns false, if it’s not set returns true. This method is useful if you have to to skip a method’s logic if its input parameter variable’s…
There are cases in which we need to be able to use number sequences even if the mode is set to manual. I am referring in particular to those automatic creation procedures that require the automatic entry of a number sequence. If the sequence encoding mode is set to manual then we will not be…
Click here to get the code to create a customer throught X++ : How to: Create customer through X++
Here are 2 articles that show how to create custom service in D365FO : Create a Custom Service in D365 (classic method) : https://dynamics365musings.com/create-a-custom-service-in-d365/ Custom Web Service in few steps D365FO (simplified method) : https://community.dynamics.com/365/financeandoperations/b/365foandaxtechnicalworld/posts/custom-web-service-in-few-steps-d365fo
Download Software deployment package Open your VM, go to LCS > Shared Asset library Go to “Software deployable package” > Select the Service update you want to download and save it. The package is very large (5-6 GB) so it can take a while to download Unblock (Properties > General) the zip file before unzipping…
When applying a Service update to aD365FO local development VM the update fails on the Sync AX database step with the following error. The problem seems to be that the SSRS service is not started. In order to fix this, start the service and re-run from the failing step. Re-run from the failing step
I want to add a computed column in a data entity. This computed column is not a simple calculated field but the result of a subquery.This query retrieve a field from a table (VendPackingSlipVersion) which is linked to the main Data Entity Data source table (VendPackingSlipTrans). The relation bewteen Main Table and the child table…
To create an xml file you can use XmlNode class and if you want to save it into a folder you can use save method, but if you want to send to the user using the browser download functionality you have to use File::SendFileToUser method. This method accepts only a MemoryStream so you must convert…
In ax 2012 there is no way to post the VAT transactions in batch mode. The only possible mode is the interactive one which can last several hours and blocks the user’s PC who is unable to work. So we decided to modify the procedure in order to give the user the possibility to launch…
Here is a good article that describes how to debug a batch job in AX2012 : https://dynamicsaxinsight.wordpress.com/2014/03/10/ax-2012-how-to-debug-batch-jobs-and-service-operations/
Login to LCS, click on your project then select Full Details The environment Form will appear, then select Log on to environment.
So, what swimlanes will support your tracking needs? Once you’ve identified one or two, add them to your Kanban board. Open your Kanban board Choose the gear icon to configure the board and set general team settings. Choose Swimlanes and then choose the plus icon and enter the name of the swimlane you want to add.The default lane appears…
To reset a bar style, right click on the bar and select Bar styles Now click the Reset button at the bottom of this dialogue and the bar style will revert back to its default.
There are two ways to indent or outdent a task in your project: Click the task row that you want to indent or outdent, and then, on the Task tab, in the Editing group, click Indent or Outdent. Click the task row that you want to indent or outdent. To indent the task, press Alt + Shift + Right arrow. To outdent…
In Project, the default time unit for work is hours, but you can change it to be minutes, days, weeks, or months: Choose File > Options. In the Project Options dialog box, choose Schedule. In the Work is entered in list, choose the time unit that you want.