Posts

Showing posts from January, 2024

Difference between Research and Execute Query in D365fo

  Difference between Research and Execute Query Research Calling research() will rerun the existing form query against the database, therefore updating the list with new/removed records as well as updating all existing rows. This will honor any existing filters and sorting on the form, that were set by the user. Research(true) ExecuteQuery Calling executeQuery() will also rerun the query and update/add/delete the rows in the grid. The difference in behavior from research is described below. ExecuteQuery should be used if you have modified the query in your code and need to refresh the form to display the data based on the updated query.

How To create Table Relation Lookup in D365fo

Image
 How to Create Table Relation Lookup in D365fo Setup A Relation Open your primary table in Visual Studio. In my example, my table is named ‘rsmVehicle’. Select the ‘Relations’ node. Right click on the relations node and select New>Relation. Next, right click on the node, in my case named ‘rsmModel’, and select New>Normal. Finally, in my example I repeated these steps for the rsmMake relation to specify a relationship between the MakeID field on the rsmVehicle table and the MakeID field on the rsmMake table. The end result looks like this. Finally, we can see what this looks like when we click the drop-down in the Vehicle form.

How to Create Auto Lookup Using EDT with Table Reference in D365 F&O

Image
  How to create a lookup in D365FO using X++? Lookups are the standard way to display a list of possible selection values to the user. For a user, while editing or creating database records, a lookup makes the data entry easy and errorless. In Microsoft dynamics 365 finance and operations, there are many ways of creating lookups. EDT and Table Relation Type lookups are the simplest forms of lookups in Microsoft dynamics 365 finance and operations. In this article, I will describe the very simplest type of lookup, which is EDT lookup, for making an EDT type lookup, a developer does not need to worry more about writing x++ coding,   Normally, standard lookups are created automatically by the system in Dynamics 365 for Finance and Operations and are based on the extended data types and table setup.  They are based on table relations and appear automatically. No additional modifications are required. Setting Up an EDT Lookup If you are a beginner use  Microsoft's free ...

D365FO Form Datasource Execute query

Image
 Form DataSource Execute Query If you want to see the query which will hit DB and fetch records to show in a form  you just have to make the Chain of command of  Form Datasource Execute query when you hover on QR or QBDS you can get the form query and also you know the ability to modify the form query or you can add multiple data sources in the form query.

D365FO – AX – Update Data Entity Target Entity fields with X++

Image
  Imagine you want to set the value of a field of the Target Entity of a Data Entity with X ++ code You have to create an extension class that extends the data Entity, extends the “mapEntityToDataSource” method, and adds your code inside. [ExtensionOf(tableStr(PurchPurchaseOrderHeaderV2Entity))] //Extends Data Entity final class Al0PurchPurchaseOrderHeaderV2Entity_Extension {     public void mapEntityToDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx) //Extends method     {         switch (_dataSourceCtx.name())         {             case dataEntityDataSourceStr(PurchPurchaseOrderHeaderV2Entity, PurchTable):             PurchPurchaseOrderHeaderV2Entity purchPurchaseOrderHeaderV2Entity = _entityCtx.getEntityRecord(); //Get Data Entity buffer (Source Entity)             PurchTable purchTa...

SQL- Server – Free disk SPACE USING SHRINK

Image
  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 Use the following steps to truncate the transaction log file: 1. Right-click the database and select  Tasks -> Shrink -> Files . 2. Change the type to  Log . 3. Under  Shrink action , select  Release unused space  and click  OK . What if the log size does not decrease? If the size of the log does not change much after this, it means that your database has the  recovery mode set to  Full  and there is  not enough unused space to recover. At this point you can consider the option  to delete all logs  by “temporary” set the database  Recovery mode to  Simple  and try another shrink. But...