scottdurow / RibbonWorkbench

Ribbon Workbench 2016 for Dynamics 365
https://ribbonworkbench.uservoice.com/
MIT License
72 stars 24 forks source link

Button Configuration Not Transferring #49

Open frick-brian opened 4 years ago

frick-brian commented 4 years ago

I have a relatively complex environment architecture - we are working on keeping about 13 D365 instances in sync with 7 of those instances being live development boxes. We have been noticing that many of our buttons come and go as they please between deployments. So, I took on the task of documenting all of our buttons and rebuilding them in one singular environment to give us a gold config of the buttons. Once I did that, I attempted to move a simple solution with just the shell of the entities that contain the buttons (with and without metadata - but never with any components) and push that over to the next environment to build the buttons. It did not work in all cases. Beyond that, even if it DID work, it did not transfer the button configuration itself.

So, tried a different approach. We run our main solution as managed out of our DEV environment and downstream. So, made sure all the buttons lived in the UI, made sure all the buttons lived in the Ribbon Workbench configs. All good in DEV. I kick off a deployment to our TEST environment, and push our managed solution over. This solution does contain all of the components for the entities impacted by buttons (forms, views, metadata, etc), and also includes our App's sitemap and Application Ribbon. But still, the buttons do not show up in the Ribbon Workbench config downstream. Some of the buttons are added back to the UI - and some show up only in strange circumstances that I am working on troubleshooting now. But here is a simple example of a button that I configured in DEV yesterday, and pushed out to TEST shortly thereafter.

DEV Button image

TEST Button image

Can you help me to figure this one out? Am I missing something simple? Is the only way to truly merge these buttons into the solution to hack the XML to ensure all the config is properly inserted?

I am on RWB 3.1.391.1.9 - so I could probably use an update, but I do not expect the update to fix an issue with how the config is stored in the solution and moved around.

Thanks

frick-brian commented 4 years ago

I should mention, I have our managed solutions doing an upgrade every time, and also set to overwrite customizations.

scottdurow commented 4 years ago

Some things to check:

  1. Is there an unmanaged layer in your TEST system for the pcx_caseplayer entity - if so - you will need to remove this unmanaged layer before you will see the Ribbon changes you are importing.
  2. Sometimes a ribbon import may need to be done twice before the ribbon changes show up
  3. If you unzip the managed solution you are installing - check that you can see the correct ribbon xml for the pcx_caseplayer.btnTerminate.Button. If you can, and it doesn't show up in the target environment - and you don't have an unmanaged layer - you'll need to raise a support ticket with Microsoft.
frick-brian commented 4 years ago

Thanks for the details. I am almost certain it has to do with solution layering of unmanaged components. I will take this and run with it this morning to see if I Can't get it to update correctly. We did just change over a few of our environments from unmanaged to managed, including the one I am currently pushing to (and showing the screenshots for) - so i am hopeful that this will be the quick fix. Thanks again for quick reply

frick-brian commented 4 years ago

What CRM component exactly holds the button configs? App Ribbon? Site Map? Something else?

Looks like the button configs are stored in so I would assume they come over in the app ribbon.

frick-brian commented 4 years ago

Well, Git stripped out the tag...

Looks like the button configs are stored in < RibbonDiffXML > so I would assume they come over inthe app ribbon is what it should have said

scottdurow commented 4 years ago

For an entity ribbon, the RibbonDiffXml is included in the solution when you add the entity - no other subcomponents are required. The Application ribbon is a separate component that applies to all ribbons.

frick-brian commented 4 years ago

That is what I thought too, but then when I opened up customizations.xml for a shell entity, there was nothing relating to the buttons in the XML itself. Come to think of it, that may have been in the environment that didn't have the button config appearing within RWB... I just opened another export of my "ORG BUTTONS" solution and checked the XML and the button XML does appear to be in there on my DEV environment which is the one I created all of the buttons in.

I am still working on removing unmanaged components and will try again. I did remove all unmanaged solutions, and re-pushed, but whatever unmanaged artifacts are left in the system likely caused the buttons to not be resolved. I will have to go through at least the entities with buttons and remove all unmanaged components from Default solution, and try again.

Will let you know what I find. Thanks again.

frick-brian commented 4 years ago

Just wanted to update you on the status here.

I have deleted every unmanaged solution from the environment. I have also gone through the default solution and deleted every unmanaged field that belonged to one of the three entities containing a button - well, those that I could delete. The system fields are unmanaged and unable to be deleted. Some of these system fields are actually reliant on another managed solution, that may or may not have been imported as unmanaged before I started at this company.

All of that being said - as clean as I could possibly make those three entities in the solution, I am still not getting my updates to fire through on the deployment downstream. I even did a solution upgrade/overwrite customizations as my last test, and still, no new buttons are created, nor are any existing buttons updated.

At this point, I am just going to manually create the buttons downstream as I don't have time to keep troubleshooting. If you can think of anything else that may lead me in the right direction, I'm all ears! Thanks again.