Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

Posted on by 370

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

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: What are the common use cases to use C# to create solutions and entities and attributes instead of just exporting and importing a solution?

    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.

  • ArdantHammer Profile Picture
    ArdantHammer 370 on at
    RE: What are the common use cases to use C# to create solutions and entities and attributes instead of just exporting and importing a solution?

    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.

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

    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

  • Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: What are the common use cases to use C# to create solutions and entities and attributes instead of just exporting and importing a solution?

    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.

  • Martin Donnelly Profile Picture
    Martin Donnelly 1,010 on at
    RE: What are the common use cases to use C# to create solutions and entities and attributes instead of just exporting and importing a solution?

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans