web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Active Discussion

What are the common use cases to use C# to create solutions and entities and attributes instead of just exporting and importing a solution?

(0) ShareShare
ReportReport
Posted on by 372

Why would you use C# to create entities, attributes, entity relationships, and many of the other customization's that are traditionally done in the GUI in solutions. My understanding is best practice is to create this kind of stuff in a solution so you can export from a dev environment and import into a production environment. Even my limited reading about ci/cd they seem to take the solution approach using powershell to deploy solutions. Am I missing a common use case for this?

*This post is locked for comments

  • Martin Donnelly Profile Picture
    1,030 on at

    I'm guessing those examples are just for expository purposes.  I can't imagine a reason for doing it by code.

    Now views (savedquery) that extend beyond the Advanced Find designer capabilities -- that's a different story.

  • Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi,

    The benefit of using C# to create these things is that you can quickly connect to an instance and create all of the components included in the code. This can be a lot quicker than manually exporting and importing a solution. You also benefit from all of the features of the C# language and can choose create components conditionally.

  • Joseph McGregor Macdonald Profile Picture
    597 on at

    Hi John

    Not sure how common this use is, but I use this API for importing customisations from Excel spreadsheets

    Basically I have a feature in an app where I define entities, fields, picklist options etc. within spreadsheets. The app reads the customisations in the spreadsheets and creates the customisations for me via this API. This has saved me a lot of time by avoiding having to create fields and picklist options one by one within the web user interface when there is a large volume of customisations

    Again not sure how common this is but answers your questions in terms of a use case for this API

  • ArdantHammer Profile Picture
    372 on at

    Sounds like a good idea to me. I have spent way to much time creating optionsets for states and countries that could easily be created once and reused using the method you are describing.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    It is helpful when you are creating a product or have all entities and attributes in a spreadsheet.

    You can write an application to import spreadsheet that create entities and attributes.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans