October 24, 2019

Create and save a csv/text file in D365FO (x++ code sample)

Hi Folks,

Let's see how to create a CSV or TXT file through X++ code and later save that on local folder.

In code there is the full syntax of File::SendStringAsFileToUser method with all parameters. However, not all of them are mandatory but it's nice if you can explore them for your solution, for eg. changing the file encoding.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

September 23, 2019

[Solved] The server did not received a response from an upstream server

Hi Folks,

Here we come to our second post on Logic app troubleshooting. Check this link (if you haven't yet) for the previous post.


  "error": {
    "code": "NoResponse",
    "message": "The server did not received a response from an upstream server. Request tracking id '#########'."

Possible reason: 

Well, there is not an issue in your logic app, it's running fine. There must be some issue with data.


As its a data related issue and to see more details on the error, navigate to data management in FO and see the execution history of this export/Import. You must get detail of error and once you fix them you must be able to run successful next time. Also, I would recommend adding an extra action on your logic app to handle this error.

Another thing you can try to do import same file manually and if you found the issue, fix that and try again with Logic app.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

PS: Logic apps can be used for multiple purposes. In most of my post, I'll be dealing with in #MSD365FO  related issues.

September 02, 2019

Set up MT940 format for bank reconciliation #MSD365FO

Hi Folks,

In D365FO advance bank reconciliation is a feature to import bank statement file and automatically reconcile with related bank accounts. There are many formats which a bank commonly used i.e. ISO20022, MT940, BAI2.

In this post, we will see how to set up the MT940 format which is commonly used in most banks nowadays.

Let's get started.

Step 1: Get sample entity template and transformation files
To transform the source file into FnO format, you need few files and these are available under 'Resources' node of AOT. Files names are as below

Step 2: Create an import project
Under Data management workspace, create an import project with name MT940. Add a new file with below details
I. Entity Name: Bank statements
II. Upload file name: SampleBankCompositeEntity (which you got from Resource node)

Once file successfully uploaded, click on view map. On next screen select BankStatementDocumentEntity from the list and click on 'View Map' and go to 'Transformation' tab. Click new and click upload file, select different XLST file one by one, in the sequence shown in below image.

Step 3: Setup Bank statement format
Navigate to Cash and Bank management > Setup > Advance bank reconciliation setup > Bank statement format.
Here create a new record as below

Step 4: Configure the bank account to use Advance reconciliation option
Navigate to Cash and Bank management  > Bank accounts. Select a Bank account to view details. Under Reconciliation tab,
I. Set the 'Advance bank reconciliation' option to 'yes'. This is a one-time setup, the system doesn't allow to undo/change once set to yes.

II. Set Statement format field to format which we have created in step 3 i.e. MT940

Step 5: Testing
Navigate to Cash and Bank management  > Bank accounts. On Reconcile tab click on Bank statements.
On the next screen click on Import statement. A dialog will pop up. Fill/select details as below

I. Import statement for multiple bank account in all entities. : Set this as Yes if your file contains more than one bank accounts.
II. Bank Account: If the source file contains a single bank, select that bank here.
III. Statement Format: Select your statement format here it must be MT940.
IV: Bank statement file import: Select source file and click upload.
V: Click ok and it must import transaction in the current form.

Note: After every DB refresh you need to redo import project. DB will break the links and you need to remove the entity from your import project and add upload the transformation files accordingly.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

PS: This post referred to MS documentation. 

August 23, 2019

QuickFix-7: Feature management in D365FO

Feature management OR Flighting is a new concept introduced by Microsoft from D365FO version 10.0 that allows turning on new features, which are delivered but not activated by default.
Some of these “hidden” new functionalities are: 
  1. ·        Client alert notifications by email
  2. ·        Manage access to network printers across legal entities
  3. ·        Business events
Check these links for more details

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

August 18, 2019

How to increase font size in BizTalk schema/Map editor

Hi Folk,

Now when Logic apps are all over around the integration of D365FO, I am sure you have seen BizTalk editor once in a while. The default editor's font size is so small, you may need a magnifier glass. And I really mean it.

I searched for some solution around the web but didn't found much of the help. Well, here I am sharing my finding with the possible solution or I would say most suitable solution as of now.

Here is a screenshot of the default font size.

To fix this issue, Go to

Setting > Display setting > Advance Display setting > Advance Sizing of text and other Items

Above navigate should give you below screen

here click on 'set a custom scaling level'. and set the scale to 300%

Once you have done this, re-login into the system and see the changes. Below is the new appearance of the same map.

For more details on BizTalk check below link,


 Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

August 04, 2019

[Solved] Error in Logic app. Status: 403

Hi Folks,

Logic comes a long way for most of the integration thing in Dynamics 365 FO. Its provides a good set of connectors to develop inbound/outbound integration process. While troubleshooting any error is not so easy while it comes to the logic app for new people. I will be sharing some the common error which I faced during development and hopefully, that will helpful for you guys too.

"status": 403,
  "message": "{\r\n  \"Message\": \"An error has occurred.\",\r\n  \"ExceptionMessage\": \"Forbidden\",\r\n  \"ExceptionType\": \"System.ServiceModel.Web.WebFaultException`1[[System.ComponentModel.Win32Exception, System, Version=, Culture=neutral, PublicKeyToken=######]]\",\r\n  \"StackTrace\": \"   at Microsoft.Dynamics.Ax.Services.ServicesSessionProvider.ThrowSessionCreationException(ServicesSessionCreationErrorCode exceptionCode)\\r\\n   at Microsoft.Dynamics.Ax.Services.ServicesSessionProvider.GetSession(Boolean isILSession, Boolean bypassAuthentication, String issuer, String company, String language, String partitionKey, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Ax.Services.ServicesSessionManager.InitThreadSession(Boolean ilSession, SessionType sessionType, Boolean bypassAuthentication, String authIssuer, String company, String language, String partitionKey, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.ServicesAosSessionManager.InitializeSession(Boolean bypassAuthentication, String authIssuerThumbprint, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.OwinRequestSessionProvider.CreateSession(ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.ServicesRequestSessionHelper.EnsureRequestSession(IServicesRequestSessionProvider servicesRequestSessionProvider, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.EnsureServicesRequestSessionHandler.EnsureServicesRequestSession(HttpRequestMessage request, IApplicationEnvironment applicationEnvironment)\"\r\n}\r\nclientRequestId: ##########",
  "source": "########Dynamics.cloudax.dynamics.com",

  "errors": []

Possible reason: 
You have used certain users in Logic apps while creating API connections. while that users don't have access to target AX system.

Check the used in target/Source AX system if the user doesn't exist import the same with admin or proper access. If the user exists then check its access.

I will keep posting any error which I faced with a solution that works for me and I hope that may work for you as well. If you are getting other error, put that in the comment section and I will try to find a solution for you.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

August 01, 2019

QuickFix-6: How to check if code is running on batch server

If you want to check if the code is running either on the batch or locally, call below method.

1. For sysOperation framework: this.isExecutingInBatch().
2. RunBase batch: this.isInBatch()

both methods will return a boolean.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

July 19, 2019

Object compare in #MSD365FO

How to compare an AOT object in D365FO.

If you received a project export (.axpp file) and you want to see what's the changes between this file and your current code. While importing this project (from Dynamic 365 menu in VS), right-click on the object and you will get the option to compare this object from your current metadata.

It will open a compare window

1 is a model store or your current metadata.
2 is Target file or file from import project
3 is a menu bar with 'Next', 'Previous', 'Expand all' and 'compare code' options.

when you click on 'compare code' option it will open this compare file in the visual studio itself, similar to other compare option.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

QuickFix-5: X++ string runtime functions

Here is a quick link that describes all the string run time functions in x++.

X++ string runtime functions

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

July 08, 2019

[Solved] Issue with default app in Windows 10, TWINUI bug

Known Bug in Windows 10,

All sudden all my default app have been changed to TWINUI and I am not even able to change it.

Open Power shell as admin and run below command,
Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

That's it, now check the default apps again

Also, you can Try below steps for Photo/Images
  1. Press Windows button + R.
  2. Type:%appdata%\..\Local\Packages\Microsoft.Windows.Photos_8wekyb3d8bbwe\LocalState
  3. Delete all the contents of that folder.
  4. Restart the computer and check if the issue persists.


Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

July 03, 2019

Working with Data entities in D365FO- Part II

Add new fields on DataEntities/Form from the user interface

Hi Folks,

In this post, I am going to share one new feature which comes with the latest update in #MSD365FO. Now you can add any custom field from the user interface, you don't need to add that in AOI, however, there are some limitation on this but having this option is good where user wants to add some fields on a form/entity which doesn't have any metadata dependency/Relation to other tables. Earlier this feature was limited to talent only now with recent version Microsoft bring this to Dynamics 365 FO as well.

For today’s post lets take an example customer group, You want to add a new field on customer group form. Let's call it ‘SPOC person’. Now to add a new field on a form, you need to personalize the form.
Open Customer group form, go Option menu, ‘select personalize this form’ option.

It will give you another pop-up window, select ‘Add Field’ and grid in the form where you want to add a new field(s).

on the next screen, click on ‘Create new field’

When you click on ‘Create new field’ a new form will open (kind of designer form). First, choose the table where you want to add this field. Select Customer Group here.

and fill other details as below, and hit the save button.

The system will ask for another confirmation

now, this field available to add on the form,

Once you insert this field, it will appear on the form,

Now go to  System Administrator > setup > custom field. Select table from the dropdown list. In the entity tab, select data entity where you want to add this new field. The system will show all the entity where the CustGroup table used.

Now go to data management > Framework parameter >  Entity Setting and refresh entity list.

Go to Customer groups entity and click on modify target mapping. Here generate the mapping. On successful completion, your custom field must available in mapping.

Here you go…. that all.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

June 26, 2019

QuickFix-4: Cheque SSRS report modification

Any cheque report needs more precision to put different fields in the right position to align with physical cheque stationary.

Open cheque SSRS report design and right click in the blank area of the report > View > Ruler.
This step will enable the ruler in your report so you can put fields in the right place in fewer tries.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 27, 2019

Working with Data entity in D365FO - Part I

Hi Folks,

In this post let’s see how to add custom and virtual fields on Data entities. This approach will work on both standard and custom entities. I will show you both scenarios. When adding new fields on a new entity, steps are very simple and all you need to add business logic in the respective data entity methods to work with the export and import process.

Custom field: When adding new fields in standard application entity like Customers (CustCustomerV3Entity), Vendors (VendVendorV2Entity), Customer groups(CustCustomerGroupEntity).

Virtual fields: Fields which doesn’t exist in a table but require to fetch any other table field. For example, assume we have purchase requisition records from another system which needs to import in Dynamics 365 FO. In source data, we have also had delivery address (string) which needs to insert into PurchReqLine table’s DeliveryPostalAddress(RefREcId) field. So we need to add a virtual field name as DeliveryAddress(string) and in code need to take this string values and create address at run time, use generated rec id to pass in PruchReqLine table. 

In part one post, let’s see how to add new fields(table fields) on standard data entity’s extension. Here is the scenario, the client wants me to add new fields in the vendor group, to capture a unique reference number from their another system. Let's call it ‘SAPVendGroup’.  
1.       Create an extension of table VendGroup, and add a new string field name it SAPVendGroup.

You need to build/DB synch to get these fields in reference objects.
2.       Create an extension of VendVendorGroup data entity and drag and drop a new field from Data source to Entity fields.

3.       Create an extension of VendVendorGroupStaging table, add new field here as well.
4.       Build your solution and DB synch.

5.       Now try to export and import.

In the next post, we will see how virtual fields work with data entities. 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 18, 2019

QuickFix-3: Runtime functions in Dynamics 365 FO

curExt(): The extension for the current company

curUserId(): current user id.

funcName(): The name of the method that is executing this method

getCurrentPartition():The short name of the current partition (max 8 char).

getCurrentPartitionRecId():The RecId field of the current data partition

getPrefix(): The current execution prefix.

sessionId():The numeric ID of the current session.

prmIsDefault(): 1 if the default value for the parameter was used; otherwise, 0.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta