admin, Author at Monsieur Winner https://blog.monsieurwinner.com/author/admin/ MS D365FO || Monsieur D365FO Thu, 20 Feb 2025 22:35:56 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 https://i0.wp.com/blog.monsieurwinner.com/wp-content/uploads/2022/09/cropped-Winner-.png?fit=32%2C32&ssl=1 admin, Author at Monsieur Winner https://blog.monsieurwinner.com/author/admin/ 32 32 209261758 Document failed to upload. Please try to upload the document again D365FO on premises https://blog.monsieurwinner.com/2024/04/08/document-failed-to-upload-please-try-to-upload-the-document-again-d365fo-on-premises/ https://blog.monsieurwinner.com/2024/04/08/document-failed-to-upload-please-try-to-upload-the-document-again-d365fo-on-premises/#respond Mon, 08 Apr 2024 08:18:35 +0000 https://blog.monsieurwinner.com/?p=715 After a fresh deployment of D365 FO on-premises, you might encounter the error “Bond Fair Value Report failed to upload.

The post Document failed to upload. Please try to upload the document again D365FO on premises appeared first on Monsieur Winner.

]]>
After a fresh deployment of D365 FO on-premises, you might encounter the error “Bond Fair Value Report failed to upload. Please try to upload the document again.” while attaching a file on all form.

 

This is because the “documents” folder in the file server is missing.

Go to aos-storage and create a new folder “documents” and you should be fine.

failed to upload. Please try to upload the document again D365FO on premises
failed to upload. Please try to upload the document again D365FO on premises

 

The post Document failed to upload. Please try to upload the document again D365FO on premises appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2024/04/08/document-failed-to-upload-please-try-to-upload-the-document-again-d365fo-on-premises/feed/ 0 715
Unable to get file endpoint, the network name cannot be found – D365FO on-premises https://blog.monsieurwinner.com/2024/03/29/unable-to-get-file-endpoint-the-network-name-cannot-be-found-d365fo-on-premises/ https://blog.monsieurwinner.com/2024/03/29/unable-to-get-file-endpoint-the-network-name-cannot-be-found-d365fo-on-premises/#respond Fri, 29 Mar 2024 17:07:10 +0000 https://blog.monsieurwinner.com/?p=710 D365 FO on premises installation.   This error occurs when the local agent tries to download the package from LCS.

The post Unable to get file endpoint, the network name cannot be found – D365FO on-premises appeared first on Monsieur Winner.

]]>
D365 FO on premises installation.

 

This error occurs when the local agent tries to download the package from LCS. This file is saved in the fileshare VM.

When the fileshareLocation  value is different what is specified in the localagent-config.json is different from FileShare path in ConfigTemplate.xml,

I am happy to tell you that you just successfully landed yourself a bonus error.

 

The post Unable to get file endpoint, the network name cannot be found – D365FO on-premises appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2024/03/29/unable-to-get-file-endpoint-the-network-name-cannot-be-found-d365fo-on-premises/feed/ 0 710
How to find table and field names on a form in D365FO https://blog.monsieurwinner.com/2022/10/01/how-to-find-table-and-field-names-on-a-form-in-d365fo/ https://blog.monsieurwinner.com/2022/10/01/how-to-find-table-and-field-names-on-a-form-in-d365fo/#respond Sat, 01 Oct 2022 12:49:05 +0000 https://blog.monsieurwinner.com/?p=529 Hello There! Today, let’s discuss : How to find table and field names on a form in D365FO. Business scenario.

The post How to find table and field names on a form in D365FO appeared first on Monsieur Winner.

]]>
Hello There!

Today, let’s discuss :

How to find table and field names on a form in D365FO.

Business scenario.

Dynamics 365 Finance and Operations is built around a single database that contains tables and fields. These fields and tables represents objects. We have names for these objects on the database. A developer can get these name using the development tool: Visual studio. These fields in contrast are displayed to user via labels. Having said that, labels are in mos cases different from the field names on the database.

As a consultants, users, there are instances where we need to get the name of fields without having to login into Visual studio. These fields names can be useful when importing data through the data management workspace or when setting up placeholders in workflow editors in D365FO.

 

Solution approach.

The good news is we can locate name of fields, tables, forms even some menu items right from the D365FO interface.

Let’s take the Global address book form as an example. As part of the fields, we have a fields labelled Party ID. To get the field name, we right click on the field then click on the form name as shown below.

 

 

 

 

 

 

The post How to find table and field names on a form in D365FO appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/10/01/how-to-find-table-and-field-names-on-a-form-in-d365fo/feed/ 0 529
Rollback failed -Dynamics 365 Finance and Operations On premises. https://blog.monsieurwinner.com/2022/09/23/rollback-failed-dynamics-365-finance-and-operations-on-premises/ https://blog.monsieurwinner.com/2022/09/23/rollback-failed-dynamics-365-finance-and-operations-on-premises/#respond Fri, 23 Sep 2022 03:28:41 +0000 https://blog.monsieurwinner.com/?p=509 As part of the Dynamics 365fo on-premises architecture, we have the Environment Orchestrator which enables on-premises environment management from LCS.

The post Rollback failed -Dynamics 365 Finance and Operations On premises. appeared first on Monsieur Winner.

]]>
As part of the Dynamics 365fo on-premises architecture, we have the Environment Orchestrator which enables on-premises environment management from LCS. We can consequently monitor our deployments in the OrchestratorData database via SQL management studio.

There are 5 steps for on-premises, whether you are deploying a package, an instance, or an ISV solution:

Step 1: Downloading the artifact from LCS and cleaning up services

Step 2: Extracting the artifacts from LCS

Step 3: Executing the pre-deployment scripts

Step 4: Deploying services

Step 5: Executing the post-deployment scripts

 

Now, I am stuck. arrrrrrrrrrrrrrrh 🙁 .

There are times when a package deployment fails on LCS. Let’s say, we found out the issue, and we want to reapply a new package. We discover that Abort/retry also fails. It can be quite frustrating when rollback keeps failing.

What to do ? 

To resolve this, and have the environment status back tot deployed, we will try to update it status to the last successful package application.

Run the following command to get the JobID and TaskID of the last successful run.

select * from OrchestratorJob order by LastProcessedDateTime desc
select * from RunBookTask order by StartDateTime desc

Execute both script at a time in SSMS

 

There is light at the end of the Tunnel? 

Now, let’s run the following script and wait few minutes for the success mail from LCS. Your environment page on LCS becomes a clean slate with no error.

update OrchestratorJob set State = 1 where JobId = ‘xxxxxxxxxxx’update RunBookTask set State = 1, Retries = 1 where RunbookTaskId = ‘xxxxxxxxxxxxx’

 

Merci.

The post Rollback failed -Dynamics 365 Finance and Operations On premises. appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/09/23/rollback-failed-dynamics-365-finance-and-operations-on-premises/feed/ 0 509
How to change the default browser when running a runnable class in D365FO https://blog.monsieurwinner.com/2022/09/16/how-to-change-the-default-browser-when-running-a-runnable-class-in-d365fo/ https://blog.monsieurwinner.com/2022/09/16/how-to-change-the-default-browser-when-running-a-runnable-class-in-d365fo/#respond Fri, 16 Sep 2022 21:58:59 +0000 https://blog.monsieurwinner.com/?p=489 As a developer, there are instances where you would wanna test some of your code by debugging. The debugger opens

The post How to change the default browser when running a runnable class in D365FO appeared first on Monsieur Winner.

]]>
As a developer, there are instances where you would wanna test some of your code by debugging. The debugger opens the runnable class in a browser. In most cases, the default browser is internet explorer, which would not give you a better result.4

 

The good news is we can switch the default browser from Visual studio.

Go to Tools -> Options

In the Dynamics tab, select Debugging and choose the preferred browser.

 

The post How to change the default browser when running a runnable class in D365FO appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/09/16/how-to-change-the-default-browser-when-running-a-runnable-class-in-d365fo/feed/ 0 489
Convert amount to words with Currency name in D365FO – X++ https://blog.monsieurwinner.com/2022/09/09/convert-amount-to-words-with-currency-name-in-d365fo-x/ https://blog.monsieurwinner.com/2022/09/09/convert-amount-to-words-with-currency-name-in-d365fo-x/#respond Fri, 09 Sep 2022 21:31:06 +0000 https://blog.monsieurwinner.com/?p=481 While designing an SSRS report recently, I had a reason to display the amount in words alongside the currency name.

The post Convert amount to words with Currency name in D365FO – X++ appeared first on Monsieur Winner.

]]>
While designing an SSRS report recently, I had a reason to display the amount in words alongside the currency name. Example:  2299.68 = Two Thousand Two Hundred Ninety Nine Naira and Sixty Eight Kobo only.

Naira represents the currency of Nigeria and 100 Kobo = 1 Naira.

 

To achieve this, I create a method in my DP class as follow: I am passing 3 parameters: Amount, Naira and Kobo.

private Description convertAmountInWords(real _amount, str _currency1, str _currency2)

{

real decimals, WordReal;
int intNum;
str 250 word, decWord, wholeWord;
int repPos, repPos1, repPoswhole;

word = Global::numeralsToTxt_EN(_amount);

repPos = strscan(word, ' and', 1, strlen(word));

intNum = _amount;

decimals = _amount - intNum;
WordReal = _amount - decimals;

if (decimals == 0.00)

{

wholeWord = num2str(WordReal,0,0,0,0);

wholeWord = Global::numeralsToTxt_EN(str2num(wholeWord));
wholeWord = strdel(wholeWord, 1, 4);
repPoswhole = strscan(wholeWord,' and', 1, strlen(wholeWord));
wholeWord = substr(wholeWord, 1, repPoswhole-1);

word = strfmt("%1 %2 only",wholeWord,_currency1);

}

else

{

decWord = substr(num2str(decimals, 0, 2, 1, 1), 3, 2);
wholeWord = num2str(WordReal,0,0,0,0);

decWord = Global::numeralsToTxt_EN(str2num(decWord));
wholeWord = Global::numeralsToTxt_EN(str2num(wholeWord));

decWord = strdel(decWord, 1, 4);
wholeWord = strdel(wholeWord, 1, 4);

repPos1 = strscan(decWord, 'and', 1, strlen(decWord));
repPoswhole = strscan(wholeWord, ' and', 1, strlen(wholeWord));

decWord = substr(decWord, 1, repPos1-1);
wholeWord = substr(wholeWord, 1, repPoswhole-1);

word = strfmt("%1 %2 and %3 %4 only",wholeWord,_currency1,decWord,_currency2);
}

return word;
}

 

The post Convert amount to words with Currency name in D365FO – X++ appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/09/09/convert-amount-to-words-with-currency-name-in-d365fo-x/feed/ 0 481
Module ‘xxxxx’ has invalid reference to module ‘xxx’ that can cause circular dependencies in D365FO https://blog.monsieurwinner.com/2022/09/03/module-xxxxx-has-invalid-reference-to-module-xxx-that-can-cause-circular-dependencies-in-d365fo/ https://blog.monsieurwinner.com/2022/09/03/module-xxxxx-has-invalid-reference-to-module-xxx-that-can-cause-circular-dependencies-in-d365fo/#respond Sat, 03 Sep 2022 06:36:16 +0000 https://blog.monsieurwinner.com/?p=474 As a Dynamics 365 Finance and Operation developer, you might come accros the following error. Module ‘xxxxx’ has invalid reference

The post Module ‘xxxxx’ has invalid reference to module ‘xxx’ that can cause circular dependencies in D365FO appeared first on Monsieur Winner.

]]>

As a Dynamics 365 Finance and Operation developer, you might come accros the following error.
Module ‘xxxxx’ has invalid reference to module ‘xxx’ that can cause circular dependencies. This is an indication that the model store is in a broken state.

Well, you do not have to panic. Patience is a virtue for all developers :D.

 

Before we look at how to resolve this, let’s take a look at the cause of this error.

Being a partner, you would often be moving objects from one environment to another. This moves models along side. This error therefore occurs when the receiving VM is missing a reference model. While creating a new model in D365FO a descriptor file is generated with the reference model.

To resolve this issue. We will locate this descriptor file and edit it.

Simply remove the line, save and refresh model from Visual studio.

 

The post Module ‘xxxxx’ has invalid reference to module ‘xxx’ that can cause circular dependencies in D365FO appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/09/03/module-xxxxx-has-invalid-reference-to-module-xxx-that-can-cause-circular-dependencies-in-d365fo/feed/ 0 474
Consume API in Dynamics 365 Finance and Operations https://blog.monsieurwinner.com/2022/08/30/consume-api-from-dynamics-365-finance-and-operations/ https://blog.monsieurwinner.com/2022/08/30/consume-api-from-dynamics-365-finance-and-operations/#comments Tue, 30 Aug 2022 22:54:23 +0000 https://blog.monsieurwinner.com/?p=458 Most companies are always ready to give you some integration work to do such as sending payment, moving file or

The post Consume API in Dynamics 365 Finance and Operations appeared first on Monsieur Winner.

]]>
Most companies are always ready to give you some integration work to do such as sending payment, moving file or sending file into D365FO.

In this demonstration, we will look at how we can consume a REST API from Dynamics 365FO using a C# project with X++ in Visual studio.

We can connect to APIs in D365FO and perform basic, GET, PUT, POST…. The basic thing is connect to the API and be able to talk with it. Web APIs are accessible through a url which we can refer to as $SiteName. Most of them require authentication which can be via a username and a password or via a key.

 

In this tutorial, we will connect to the boredapi service.

The API suggests random activities to do when bored.

 

The url to get activities is https://www.boredapi.com/api/activity/

TESTING WITH POSTMAN

Here, there is no authentication which means we can easily connect to the service and get random activities. I would first of all try to connect to this using postman.

I got a response.

CALL API FROM D365FO

Having tested with postman, now we can head to D365FO development environment to have some fun. To make a call from Visual studio, here are few steps:

  1. Create a C# .NET Framework class library.

Here we will create a dll which will establish a connection with BoredAPI.

2. Create a method to get the activity

With the HttpClient we will connect to BroedAPI using the URL (siteName).

Here is the code sample to consume API in D365FO

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace KWSBoredAPI
{
    public class Helper
    {
        public static string getActivity(string request, string siteName = "https://www.boredapi.com/api/activity/",
             bool addHeader = false)
        {
            string retString = "";

            HttpClientHandler clientHandler = new HttpClientHandler();
            clientHandler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => { return true; };

            // Pass the handler to httpclient(from you are calling api)
            HttpClient client = new HttpClient(clientHandler);

            client.BaseAddress = new Uri(siteName);
            client.DefaultRequestHeaders.Clear();

            try
            {
                HttpResponseMessage response = client.GetAsync(request).Result;
                if (response.IsSuccessStatusCode)
                {
                    retString = response.Content.ReadAsStringAsync().Result;
                }
            }
            catch (System.Exception ex)
            {
                retString = "issue with the call";
            }
            return retString;

        }
    }
}

 

 

As we can see, our dll is ready. You can check the result using a console app project.

3. Create an X++ project

Now, we will create a Runnable class to call the activity endpoint.

Let’s add the class library as a reference to our X++ project.

Right click project -> add -> reference

4. Create a runnable class

Next, we are running our class to see the outcome.

5. Run the class

Now we need to go visit some old teachers, lol.

 

 

I hope you enjoyed this.

Aurevoir!

The post Consume API in Dynamics 365 Finance and Operations appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/08/30/consume-api-from-dynamics-365-finance-and-operations/feed/ 2 458
Error executing code: The field with ID ‘0’ does not exist in table ‘TableName’ in D365FO https://blog.monsieurwinner.com/2022/08/29/error-executing-code-the-field-with-id-0-does-not-exist-in-table-tablename-in-d365fo/ https://blog.monsieurwinner.com/2022/08/29/error-executing-code-the-field-with-id-0-does-not-exist-in-table-tablename-in-d365fo/#respond Mon, 29 Aug 2022 12:27:30 +0000 https://blog.monsieurwinner.com/?p=451 Error executing code: The field with ID ‘0’ does not exist in table ‘TableName’ in D365FO While running code that

The post Error executing code: The field with ID ‘0’ does not exist in table ‘TableName’ in D365FO appeared first on Monsieur Winner.

]]>
Error executing code: The field with ID ‘0’ does not exist in table ‘TableName’ in D365FO

While running code that has to do with newly created fields, you might come across the following error: “Error executing code: The field with ID ‘0’ does not exist in table

This is simply because the table is not synchronized with the database.

To resolve this we do the following:

 

  • Make sure the table is part of your project
  • On the Project property Synchronize database on build
  • Rebuild project

 

 

The post Error executing code: The field with ID ‘0’ does not exist in table ‘TableName’ in D365FO appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/08/29/error-executing-code-the-field-with-id-0-does-not-exist-in-table-tablename-in-d365fo/feed/ 0 451
Programmatically switch off D365FO DEV Virtual machine from Azure devOps(ADO) https://blog.monsieurwinner.com/2022/08/21/programmatically-switch-off-d365fo-dev-virtual-machine-from-azure-devopsado/ https://blog.monsieurwinner.com/2022/08/21/programmatically-switch-off-d365fo-dev-virtual-machine-from-azure-devopsado/#comments Sun, 21 Aug 2022 12:35:33 +0000 https://blog.monsieurwinner.com/?p=430 While onboarding a new client for the Dynamics 365FO, there is a quite number of components to consider; among others

The post Programmatically switch off D365FO DEV Virtual machine from Azure devOps(ADO) appeared first on Monsieur Winner.

]]>
While onboarding a new client for the Dynamics 365FO, there is a quite number of components to consider; among others fall the Development environment (Tier 1).

 

Prior to November 2020, Tier 1 sandbox was hosted by Microsoft. All clients are expected to host their respective development environment via an azure subscription which will be billed hourly. Most of the time, partners are in charge of clients’ LCS and manage both Dev environment and Azure DevOps platform.

We have to consciously try to stop the VM from LCS every close of business to minimize the consumption cost. We want to be able to switch -off these VM machines automatically during off-hours.

Doing this daily becomes manual where as it could be automated using Azure build agent on ADO, with the help of Dynamics 365 Finance and Operations Tools which is an extension on the Azure marketplace

In simple step we will run through this.

PREREQUISITE

The user account for this exercice must have access to the Azure subscription used in deploying the development environment .

 

Go to project on ADO then go to Pipelines, then click on new.

 

 

Here, we are creating a new pipeline with an empty job. Inside this job, we will install an Azure extension that will do the actual job of putting of our VM when we wish to(off hours preferably).

 

Name the Pipeline and install the Azure virtual machine extension.

Add a new task to the job.

Here, because I have already installed the extension in the past, I would simple add, else we have to install it first.

Configure the Task.

Select stop VM, select the Azure subscription for deploying the cloud hosted environment, select the resource group and lastly the VM.

Lastly setup up the frequency by adding a schedule under the Trigger tab.

The below image shows that we want the VM to auto go off by 3am on the following days.

Merci for reading.

 

The post Programmatically switch off D365FO DEV Virtual machine from Azure devOps(ADO) appeared first on Monsieur Winner.

]]>
https://blog.monsieurwinner.com/2022/08/21/programmatically-switch-off-d365fo-dev-virtual-machine-from-azure-devopsado/feed/ 2 430