How to migrate D365 Business Units and their default teams and keep GUIDs - dynamics-crm-365

I've been trying to migrate some BUs and their default teams from our dev environment to a higher environment and keep the default teams' GUIDs the same in both envs but have not been successful. I tried changing the order I deploy them, ie tried deploying BUs before and after teams but it made no difference. The problem is when I deploy a BU, the system automatically creates a default team which I cannot delete or rename or even make non-default so that I could make the teams I want (with the same GUID) as default. Also I've tried different tools such as SDK's DataMigrationUtility and XrmToolBox's Data Transporter but the outcome is the same, i.e. I cannot get rid of the default team.
I would appreciate any advice on how to do this.
Thanks in advance

Default Teams for BU are created by system automatically and you cannot transfer them or create them or unassigned them.
Same is the case with default queue for Team (owner Team) you cannot create them, transfer them and unassigned them.
You could definitely transfer Teams (which are not default teams) but unfortunately the one you are trying is not possible.

Related

Prevent users from creating new work items in Azure DevOps

I've been looking at organisation and project settings but I can't see a setting that would prevent users from creating work items in an Azure DevOps project.
I have a number of users who refuse to follow the guidelines we set out for our projects so I'd like to inconvenience them and the wider project team so that they find it better to follow the guidelines than not - at the moment we've got one-word user stories and/or tasks with estimates of 60-70 hours which isn't reflective of the way that we should be planning.
I'd still want them to be able to edit the stories or tasks and moving statuses, but that initial creation should be off-limits for them (for a time at least). Is there a way to do this??
The Azure DevOps Aggregator project allows you to write simple scripts that get triggered when a work item is created or updated. It uses a service hook to trigger when such an event occurs and abstracts most of the API specific stuff away, providing you with an instance of the work item to directly interact with.
You can't block the creation or update from, such a policy, Azure DevOps will inform the aggregator too late in the creation process to do so, but you can revert changes, close the work item etc. There are also a few utility functions to send email.
You need to install the aggregator somewhere, it can be hosted in Azure Functions and we provide a docker container you can spin up anywhere you want. Then link it to Azure DevOps using a PAT token with sufficient permissions and write your first policy.
A few sample rules can be found in the aggregator docs.
store.DeleteWorkItem(self);
should put the work item in the Recycle Bin in Azure DevOps. You can create a code snippet around it that checks the creator of the work item (self.CreatedBy.Id) against a list of known bad identities.
Be mindful that when Azure DevOps creates a new work item the Created and Updated event may fire in rapid succession (this is caused by the mechanism that sets the backlog order on work items), so you may need to find a way to detect what metadata tells you a work item should be deleted. I generally check for a low Revision number (like, < 5) and the last few revisions didn't change any field other than Backlog Priority.
I'd still want them to be able to edit the stories or tasks and moving statuses, but that initial creation should be off-limits for them (for a time at least). Is there a way to do this??
I am afraid there is no such out of setting to do this.
That because the current permission settings for the workitem have not yet been subdivided to apply to the current scenario.
There is a setting about this is that:
Project Settings->Team configuration->Area->Security:
Set this value to Deny, it will prevent users from creating new work items. But it also prevent users from modify the workitem.
For your request, you could add your request for this feature on our UserVoice site (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ), which is our main forum for product suggestions.

Perforce: Sync master data but directly download derived data as well

This must have been solved somewhere but I can't find a straightforward answer.
The Perforce depot has code, master data, and derived data. But only the code and master data need to be source-controlled. The derived data can be generated during nightly-build on the build machine.
Here is the problem: The users want to sync with the depot as usual and get all three above. So the derived data must be downloaded after user clicks "Get Latest Version" in P4V. They don't want to run extra scripts on their local machines either.
Is there anything I can do on the server side to make this happen?
EDIT
The reason why the derived data had better not be submitted:
The derived data are owned by a particular team as their products. These data are constantly edited by only that team on multiple machines and could have constant conflicts. So for their convenience, the data should not need to be checked out and checked in on every single edits because conflicts should be handled from the master-data end, so the derived data better be excluded from SCM.
The rest of the project teams simply consume these derived data in their work and require no change at all. They should only get one healthy batch of the derived data from the depot, say, once a day.
Submit the derived data from the build machine each night after it's rebuilt.
Have the team that needs to rebuild it themselves exclude it from their client views. This is easy to automate in various ways, e.g. via virtual streams or client spec triggers, but even if it's done "manually," it's only done once per workspace, so there's no maintenance cost.
For everyone else the derived data just syncs down normally, and you can use protections to make it read-only to everyone but the build machine if you want to make sure that nobody is checking it in when they shouldn't be.

CRM 2011 RU13 The workflow cannot be published or unpublished by someone who is not it's owner

I have created and added some workflows to CRM 2011 RU13, through the UI
Through not fault of my own my development environment is completely air gapped from my production environment.
I added these workflows to my solution and exported the solution as managed and given the solution to the production admin.
When he deploys it fails with this message.
The workflow cannot be published or unpublished by someone who is not it's owner
How do I fix this. There is no way to not give workflows an owner. or say that the owner is the solution.
The production admin gets that message because he is not the owner (inside the target CRM environment) of one or more active workflows included in your solution.
This happens in these situations:
First time you give your solution to be imported, is USER_A to
perform the operation and all the workflows are assigned automatically
to him. If later USER_B try to import an updated version of the
solution he gets the error message because is not the owner of the
workflow(s).
First time you give your solution to be imported, is USER_A to
perform the operation and all the workflows are assigned
automatically to him. Meanwhile one or more workflows are assigned to
USER_C. If later USER_A try to import an updated version of the
solution he gets the error message because is not the owner of the
workflow(s).
Before a workflow can be updated must be first deactivated, and only the owner can deactivate a workflow. This is by design.
In your case the production admin must be the owner of the processes (he can assign temporarily the workflows to himself, import the solution and after assign back to the right user) or needs to be the owner of the workflows to import the solution (if he has the rights)
A couple of additional points for clarity for the OP:
The owner of the workflows in your dev environment is not relevant, the importing user in prod will become the owner (this does not contradict Guido, I'm just making sure you don't follow a red herring). It is quite right for their to be an "air gap" between dev and prod.
If you know which workflows are in your solution, assign those in prod to yourself, then import, then if and only if you need to, reassign them to the original owner(s).
You may not need to if that owner is just an equivalent system admin user, but if it is a special user (eg "Workflow daemon" so users can see why it updated their records) you will want to re-assign.
Note that after re-assigning them, that user has to activate the workflows. You cannot activate a workflow in someone else's name (or users could write workflows to run as admins and elevate their priviledges).
If the workflows have not actually been changed in this version of your solution, take them out of the solution and ignore them - often I find that a workflow has been written, carried across to production in the original "go live" and is then working perfectly fine, but is left in the solution which is constantly updated and re-published (ie export / imported).
Personally I often have a "go live" solution (or more than one, but that's a different thread...) and then we start all over again with a new solution which only contains incremental changes thereafter. This means that all your working workflows, plugins, web resources etc do not appear in that solution so this avoids confusion as to versions, reduces solution bloat, and avoids this problem of workflow ownership. If a workflow is actually updated, then you need to deal with the import, but don't make this a daily occurrence for unrelated changes.

SSRS 2008 R2 Change Shared Data Source for Production vs Test

I am trying to figure out the best way to mitigate this situation. My project team consists of 3 developers each with their own instances of SSRS installed. We have 2 external SSRS servers that we must push updates to in order for the customer to review and for us to test and there is a 3rd external server coming online that will not be administered by us.
I have been trying to find a way to set the Shared Data Source to the current environment regardless of the system it is on. I had thought that just a common naming convention for the ReportServer address would be fine, but we've already found them to be inconsistent on the production and test servers. My next attempt was to specify an ODBC connection and let each person create a system DSN with connection information, but after an entire day of messing with it and continually getting errors, I'm not convinced it's the way to go. ( The most recent error being "The specified DSN contains an architecture mismatch between the Driver and Application" ). I have tried going through Windows ODBC DSN msc to create the DSN and I have tried using Report Builder 3.0 to create one and neither seem to work.
So I guess at this point I just have to ask, is there a best practice for going about this? I'd like to do local development and testing via the "Run" button inside Report Builder and then I'd just like to upload the file to the Report Manager and have it work regardless of the URL for the Report Server.
If the properties (connectionstring, etc) for shared data sources don't change much on your servers, the following may work for you: in the properties for your project set OverwriteDataSources = False for the appropriate configurations. Set it to true only temporarily to change the data source, if needed.
That way any dev can safely deploy to the servers, without affecting the data source, even if (s)he locally changed something (e.g. the connection string) to match a personal environment.
Not an optimal solution, but relatively easy to set up.

What are the methods of rolling out new/beta features to a large user-base?

So as to avoid overwhelming the infrastructure in a web application instance, what would be the methods of implementing a feature roll out to a controlled group of your user-base?
It depends on the situation. You can't really redirect them to another site using another database if the users are expecting to work with real data and the real site.
I would introduce a flag on your users in your user-table, let's say isBetaUser (bool). Then you can just show these new features for users that got this flag set to True. You could also let them check this flag off using a checkbox through some settings page, if they don't like the idea of trying out new features that is.
Partition your users into groups. Randomly. Demographically. Somehow.
Pick one or more groups for a pilot.
Fix your web site to have both versions of your app running. Maybe use virtual hosting or a different path or something.
One database. Two applications. Data doesn't move. Only the presentation changes.
At first, all users are in the old version. Workload has not changed.
Move a group of users so that their default URL's or links or menus or whatever are references to the new application.
Same workload. Same database. Same number of users. Two applications.
Move another group of users to the new application.
Same workload. Same database. Same number of users. Two applications.
Eventually, after all users are moved, you can delete the old application.