Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change entity schema name without deleting and recreating

I'm working with a vendor developing a new project on Microsoft Dynamics 365 CRM, with quite a bit of custom functionality and custom entities. The vendor has made some assumptions about entity names that I don't agree with, and I'd like to change the entity names. I've been told that they can change the display name, but can't change the actual entity schema name without deleting an recreating it, and that would be a significant amount of effort because they'd need to then reconfigure all the relationships and business rules around those entities.

I'm not saying they're wrong, but it kind of blows my mind that Microsoft wouldn't have any way of refactoring entity names. This isn't a live application - it's in a fairly early stage of development. I'm wondering, is there any way that we can change entity names without deleting and recreating them?

One thought I had was perhaps exporting the solution and manually editing that exported solution; I believe when you export a solution it outputs a zip file that then could be imported to a separate environment - could that zip file be manually modified to change entity schema names, then imported? I don't care if that means we'd be annihilating data.

like image 601
Jim Avatar asked Dec 04 '22 22:12

Jim


2 Answers

Your vendor is correct this isn’t possible. Schema names are locked on creation, due to the number of dependencies that are generated as the system is customised.

Whilst you could attempt a manual edit of the solution file its not supported.

Editing a solutions file to edit any solution components other than ribbons, forms, SiteMap, or saved queries is not supported.

So even if you get it work, it will probably be a bit a pain, and you run the risk that you generate problems for yourself further down the line. The customisations directly affects a large number of elements, including the database, and it’s pretty difficult to predict the exact consequences as so much functionality is wrapped up implementations we have no control over. If you do run into those problems Microsoft may be less than helpful as you would be unsupported.

Speaking from experience, whilst it’s irritating this is one of those things that is best to just leave be and move on. End users will have no idea schema names even exist, it’s only visible to technical people. Entity display names change regularly, so it’s not unusual to find a schema name different from a display name - the out of the box entities come that way, i.e, incident, kbarticle, transactioncurrency, importmap, template, list, salesorder, bulkoperation to name a few. Account always seems to be renamed to organisation or company. The benefit of changing schema names is so small for the effort and risk involved, if it was me I would spend my time and effort elsewhere.

like image 121
James Wood Avatar answered Dec 31 '22 14:12

James Wood


Since it's early on you're better off deleting and recreating. Hacking the solution XML isn't going to change the table or field names in the database. Sure you could maybe get away with exporting, editing, and re-importing into a different environment but re-exporting and importing back into the original environment isn't going to fix it.

like image 32
Jason Lattimer Avatar answered Dec 31 '22 14:12

Jason Lattimer