How to Use the modelutil.exe to Delete a Model Name in Dynamics 365 for Operations

by | Mar 21, 2018 | Development, Dynamics 365 for Finance and Operations, Dynamics AX

While getting introduced to development in Dynamics 365 for Finance and Operations, I found myself in a situation of adding/removing a model. There is a helpful tool we can use called “modleutil.exe”. This executable can be levied to accomplish a multitude of possibilities such as, import, delete, replace, and export.

In order to use the modelutil.exe to delete a model name, you first need to know where the modelutil.exe is located. Navigate to the AOSService folder, drill down in the PackagesLocalDirectory and its bin folder. The modelutil.exe is best used in a shell, which is a program that allows a command-based interface to the system’s kernel. Use CMD.exe or PowerShell.exe.

Working in the solution, I came across an issue that resulted in a harsh lesson. I made a model that I later did not need, only to find that the name was taken when I wanted to create a new model. For this instance, I created a model named Model1. I could not reuse the name Model1. Because modelutil.exe was not fully understood, I dug into the file structure. I recommend that you should not do that.

When using the modelutil.exe, you must understand some details. First, the exe requires you to use a command line tool, like command prompt. In a command line tool run the “modelutil.exe /?” this will display the following text.

If you notice, there are five different options to choose from: export, import, replace, delete, and importxref. Each of those options has further requirements. For the metadatastorepath, you will need the path to the PackagesLocalDirectory. For the modelname, you’ll need the model’s name.

The case that I described above will require the fourth option, the ‘-delete’ option. Once I deleted the previous model, I was able to continue to create a new Model1 model in Visual Studio.

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

february

27feb11:00 am12:00 pmConfab With Stoneridge - Livestream - Cool Features in Dynamics 365 Business Central

march

04mar12:00 pm12:30 pmPower BI & Reporting with Dynamics 365 Customer Engagement

04mar2:00 pm3:00 pmHow to Incorporate the Power Platform with Dynamics 365 Finance and Supply Chain Management

12mar11:00 am12:00 pmConfab With Stoneridge - Livestream - Power Apps AI Builder

18mar12:00 pm1:00 pmMoving from CRM On Prem to the Cloud – Is it worth It?

18mar2:00 pm3:00 pmThe Past, Present, and Future of Dynamics 365 with Machine Learning and Artificial Intelligence

25mar2:00 pm3:00 pmAchieve Total Data Access & Future-Proof Your Reporting

26mar11:00 am12:00 pmConfab With Stoneridge - Livestream - Portals

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X