DateTime functions

Latest version of Ax refers to the fields which are of type UtcDateTime . There are situations where we need to find the records for a particular created Date or between from/To datetime fields. In such cases, Global class helps us with the functions:
  • datetobeginUtcDateTime
  • datetoendUtcDateTime
Below code snippet finds the records from the purch table for the given date.
public static void main(Args _args)
          date dateToConvert = mkDate(29,8,2017);
date dateToConvertEnd = mkDate(29,8,2017);
        select purchTable where
(purchTable.CreatedDateTime >= Global::datetobeginUtcDateTime(dateToConvert,          DateTimeUtil::getUserPreferredTimeZone()) &&
purchTable.CreatedDateTime < Global::datetoendUtcDateTime(dateToConvertEnd, DateTimeUtil::getUserPreferredTimeZone())) ;
Posted in Ax 2012, D365 Operations, Uncategorized | Tagged , | Leave a comment

Move the objects from one model to another – D365 FO

In order to move the objects from one model to another model, we opt to copy -paste from original model`s physical folder to destination model`s folder. This is feasible when we have limited objects. but if the object count is more, this approach is tedious.
So here is another way to move the objects from one model to another.
  1. Open the project which has all the objects.
  2. In the same solution, create another project and set its model to the new one .
  3. Drag and drop the objects from the above project to the new one .
  4. Sync and Rebuild.
  5. Now the objects are ready in new model .
This way our job becomes easy and we can be sure the obejcts are not missed because there are chances of missing the objects when they are moved across physical locations.
Posted in D365 Operations, Uncategorized | Leave a comment

Automatic Settlements with Credit Notes – Ax2012 /D365 FO

In Ax, Automatic settlements can enabled while posting Invoice . This set up can be done from :
  1. AR Parameters -> Settlements Tab -> Options group
  2. AR -> Posting Profiles -> Table restriction group
When Automatic settlement is enabled,parameters can also be set to decide against which transactions the Credit note can be settled. For instance, it can be settled against Open transaction against the customer or with the original SO or with the payment created. This set up can be done from
When the parameter “Default Settlement type for Credit notes” is set to None,the credit note will be settled against the original SO. If it is Designated Transactions, the settlement will be against GL Transactions which have open balance.
Note: There might be various other factors involved for the users business requirement. This is just a cent of my thought where Automatic settlement is involved with the above set up.
Posted in Automatic settlement, Ax 2012, D365 Operations | 1 Comment

Create Settlement on payment journal creation- D365 FO / Ax2012

There are scenarios where we might need to create  settlement dynamically when a payment journal is created. As we are aware, SpecTrans is the table which is used for this requirement. This post gives an overview of the fields that are needed when this table is used for marking settlement.
As a first step, for our requirement a new payment journal is created with corresponding values. So how do we populate the values in SpecTrans which marks the settlement?This is where the fields SpecTransRecid/SpecTransTableId plays a role. These fields are mapped with the values of Tableid and RecId of the LedgerJournalTrans where the settlement is marked.
What is the use of the field RefRecid/RefTableId? In our scenario, the invoice and the actual settle amount are referred from the table CustTransOpen (from the relation CustTrans). So these fields have the values of TableId and RecId of CustTransOpen.
The field Balance01 denotes the amount that is being settled. If there is partial settlement , then this field has the value of settled amount.
Given below the code snippet which is used for Customer settlement.
Posted in Uncategorized | Leave a comment

Data Management Export – D365 FO

We had a requirement where the DMF export has to be triggered when a posting happens.
Given below the code snippet which works independently when few of the input parameters are given.



Posted in Data Management - DMf, Dynamics 365 Operations - Ax 7.0 | Tagged , | Leave a comment

Hide “Export to Excel” – D365 Operations

The option of “Export to Excel” always appears by default on all the forms . Is there is a way to suppress this option. Yes. Here it is :
Export To Excel.JPG
The property ” Export Allowed” in the form grid can be set to No. Thus the user will not be able to see the option of “Export to Excel”.
Another tip : Is it possible to change the text “Export to Excel” to other text value?? Yes. In the picture above, look at the other option “Export label”. By default, this label takes the value as “Export to Excel”. User can enter the label as per the requirement and the effect can be see on the form after a build.


Posted in D365 Operations, Dynamics 365 Operations - Ax 7.0 | Tagged , | Leave a comment

Unhide the personalised field(s) – D365 operations

Personalisations helps us to hide/unhide/add the fields which we need or do not need. In my previous blog  , we saw on exporting limited fields with the help of personalisation.
In this blog, let us see to unhide the fields which we were hidden.
For instance, let us assume, the field “Orderer” has been hidden from the form “Vendor Invoice Entry”. This field will not be visible even after the form refresh or reload the form. Given below the steps on doing this.
  1. Click on Personalise option again
hide 1
On clicking this option, you will see this personalize table. Click the highlighted one. (this is the option to Unhide) .
As soon as you click this highlighted option, you will see all the hidden fields:
Then click on the field which you wanted to see. (In  this case, click Orderer ). Then click Close in the personalize table. Now you will be able to see the field.



Posted in D365 Operations, Dynamics 365 Operations - Ax 7.0, Uncategorized | Tagged , | Leave a comment