Dynamics 365 F&O: How to Set Up a New Model from Scratch?
Alright, let’s cut to the chase. If you’ve ever worked in development, you know how easy it is to mess up a customization when you don’t start with a proper model. We’ve seen developers just put code into the wrong layer, slap something onto an existing package, and call it a day—only to have headaches six months later during an upgrade.
A model in D365 F&O isn’t just some checkbox you tick in Visual Studio. It’s your project’s backbone. It keeps your custom tables, forms, classes, and data entities in one place, cleanly separated from Microsoft’s standard objects. This makes the process a lot easier when your code needs versioning, deployment, or scaling across environments.
Forget what the official docs tell you about “standard workflows.” In practice, the devil is in the details: picking the right publisher prefix, setting the correct layer (hint: always use CUS for customizations), and making sure your artifacts don’t step on others’ toes during compilation or runtime.
In this piece, we’ll show you exactly how I approach creating a model in Dynamics 365 Finance and Operations. No fluff, no corporate buzzwords—just the practical steps, gotchas to avoid, and battle-tested best practices that make your customizations rock-solid and upgrade-proof. If you’ve struggled with messy deployments or painful code merges in the past, this is exactly what you need.
Understanding Models in Dynamics 365 F&O
At its core, a model in D365 F&O serves as a logical grouping of development artifacts such as tables, classes, forms, data entities, and other elements. Unlike a project that resides within Visual Studio, a model organizes your customizations at a higher level, enabling clean deployment, versioning, and maintenance.
When you create a custom model in Dynamics 365 Finance & Operations, you isolate your customizations from standard Microsoft objects. This helps in achieving better upgrade paths and avoids conflicts with future product updates.
Why Create a Custom Model in Dynamics 365 Finance & Operations?
If you’ve spent time in D365 F&O development, you already know the pain of messy customizations. That’s exactly why setting up a custom model isn’t optional—it’s just how things should be done.
- Keeps Things Clean: Your custom code doesn’t get tangled up with Microsoft’s standard stuff. It makes life easier when an update hits, and you don’t have to untangle a spaghetti mess.
- Easy Version Tracking: Hook it up to source control and you’ve got a clear history of what changed and why. No more hunting through random folders wondering where that one table went.
- Simple Deployments: Want to move your work to a test or production environment? Package your model and deploy. No manual copying, no random DLL surprises.
- Reusable Work: Build once, reuse everywhere. Custom payroll logic? Inventory tweaks? Just pull the same model into your next project and you’re good to go.
Bottom line: Don’t skip it. Set up a model from the start, and thank yourself later.
Prerequisites
Before proceeding, ensure the following are in place:
- Visual Studio installed and connected to the Dynamics 365 F&O development environment.
- Appropriate user privileges and a working knowledge of the Application Object Tree (AOT).
- An active D365 F&O development environment.
Step-by-Step Guide to Dynamics 365 F&O Create Model Process
If you’ve ever wondered how to create a model in Dynamics 365 Finance and Operations the right way, here’s a no-nonsense, practical approach based on real-world experience.
1. Launch Visual Studio in Your D365 F&O Development Environment
First, fire up Visual Studio directly from your Dynamics 365 F&O development VM. Make sure you’re running it as an administrator—trust me, this saves you from random permission errors during model setup later.
2. Open Model Management
In Visual Studio, head to the top menu and navigate to Dynamics 365 > Model Management > Create Model. That will open the model creation wizard, which walks you through the basic setup without guesswork.
3. Define Your Model Properties
Here’s where you make your model yours:
- Model Name: Give it something clear and meaningful, like CustomPayrollEnhancement.
- Model Description: Keep it short but descriptive—e.g., “Customizations for payroll processing enhancements.”
- Publisher Prefix: Pick a unique prefix (like CPE) that’ll tag your artifacts and keep them easy to identify.
- Layer: Most of the time, you’ll want to go with the CUS (Customer Layer) when creating a D365 F&O customization model. This keeps your work in the right place and avoids issues during upgrades.
4. Select a Package
Every model lives in a package. Either pick an existing one if you’re adding to an ongoing project or create a new one if this is a clean, standalone set of customizations. Pro tip: Creating a dedicated package makes your model management in Dynamics 365 F&O cleaner and avoids deployment confusion later.
5. Review and Create
Alright, now that you’ve filled in all the details, don’t just blindly click Finish. Take a second to glance over what you entered. Is the model name something clear? Did you set the right publisher prefix? Layer CUS, right? The package makes sense? These small details will save you from major headaches later.
Once you’re sure it’s all in place, hit Finish. Visual Studio will then spin up the model and slap it right into the AOT. Boom—you now have your own space in the system to start building custom stuff like tables, forms, and classes. This is where your custom model in Dynamics 365 Finance & Operations officially lives, ready for whatever you need it to do.
Best Practices for Dynamics 365 Model Creation
Let’s skip the corporate fluff and talk real talk. If you don’t follow some solid rules when you create a model in Dynamics 365 Finance and Operations, you’ll end up with a maintenance nightmare. Here’s what actually works in the field:
1. Stick to Clear Naming
Don’t get fancy or vague. Use simple, consistent prefixes and names. If your model is for payroll tweaks, call it something like PayrollEnhancement. It saves you from digging through folders later, trying to figure out what the hell you named that table.
2. Use the Right Layer (Always)
This isn’t optional. Your custom stuff belongs in the CUS layer. Don’t mess around trying to use ISV or VAR unless you’re actually developing for an ISV partner. CUS is where customer-specific models should live.
3. Keep Business Logic Out of Standard Objects
Never, and I mean never, mess directly with Microsoft’s standard tables or classes. Use extensions or event handlers instead. This keeps your model clean and makes life way easier when the next big upgrade comes.
4. Small, Focused Models Win
Don’t lump everything into one giant model. Split things by purpose. One model for payroll, one for inventory tweaks, another for integrations. Makes your life easier, keeps builds fast, and avoids a mess of dependencies.
5. Write Useful Comments
Don’t be lazy. Add descriptions where it makes sense. Anyone (including future you) who opens this model six months from now should understand why this exists without a guess.
6. Use Source Control
Hook your model up to Git or Azure DevOps from day one. Track every change. Roll back bad ideas without a sweat. It’s not optional if you care about sanity.
Follow this, and your Dynamics 365 F&O model creation won’t be the stuff of nightmares.
Closing Note
Look, if you don’t start with a proper model in Dynamics 365 Finance and Operations, you’ll end up chasing problems forever. Tables, forms, classes—they’ll all get messy, and upgrades will bite you.
A D365 F&O customization model gives you a space where your stuff lives without breaking the standard system. You can move it around, track changes, and actually know what’s going on. That’s the point.
At , we’ve built plenty of these models the right way. Nothing fancy, just clean, organized, and practical.
