Posts in Category: configuration

Installing USD Package Solutions

I’ve been trying for the last few days to install the solutions for the Unified Service Desk (v4) on a brand new tenant.

Turns out this was much more complicated than I thought as I ran into the dreaded “Initializing Connections 1 of 5” error where the whole app pretty much hangs forever.

After awhile of staring at the problem, I realized this could be a problem with the Package Deployer not being able to handle MFA (even though it prompts you for the logins and everything).

Sure enough, I tried a new account and things worked fine.  The only issue I ran into as an after thought was the “multiple tokens in cache” issue which can be resolved here.

And finally got to this stage.

Read More


Bulk Delete with Dynamics365

No matter what project you are on, you are at one point or another going to need to delete data.

Your environment will become polluted and you going through each entity or manually queuing up your own delete jobs will not be worth your time.

To bulk delete your entire environment you can make use of the Bulk Delete API with the following lines of code.

QueryExpression bulkquery = new QueryExpression();
bulkquery.EntityName = entity.LogicalName;
bulkquery.Distinct = false;

BulkDeleteRequest request = new BulkDeleteRequest
{
JobName = String.Format("System Purge Requested for Entity [{0}] - All Records", bulkquery.EntityName),
QuerySet = new[] { bulkquery },
StartDateTime = DateTime.Now.ToUniversalTime(),
ToRecipients = new[] { currentUserId },
CCRecipients = new Guid[] { },
SendEmailNotification = false,
RecurrencePattern = String.Empty
};

ExecuteMultipleResponse response = new ExecuteMultipleResponse();
response = (ExecuteMultipleResponse)_svc.CrmService.Execute(multipleRequest);

Of critical importance is the

Read More


Unified Service Desk Customization Files

I’ve been doing some custom hosted control work for the Unified Service Desk lately and wanted to implement the ability to have my controls download automatically on any new deployment without having to copy them over.

The benefits of this approach is that you are not putting your files into your main install directory (and potentially corrupting your USD install) but rather deploying them to your App/Local Data folder where they will be automatically downloaded.

Neil Parkhurst does a great job on the walkthrough there – https://neilparkhurst.com/2017/08/01/usd-customization-files/ – so I’m not going to take away from that.

What I do want to highlight are some other issues I ran into when trying to get things to deploy;

  1. If your zip file is more than 5MB you are going to need to increase your file upload

    Read More


Adding Items to a Dynamics Queue

Continuing off my post of adding items to a queue programmatically, I wanted to add items to this queue (why else would I be using a queue?).

The code here is relatively simple and boring as I queried for a contact named Andrew, found him and added a new queueitem to the queue.

QueryExpression queryContact = new QueryExpression();
queryContact.EntityName = "contact";
queryContact.ColumnSet = new ColumnSet(true);
queryContact.Criteria.AddCondition("firstname", ConditionOperator.Equal, "Andrew");

EntityCollection entityContacts = _CrmService.RetrieveMultiple(queryContact);
EntityReference contactRef = new EntityReference("contact", entityContacts[0].Id);

Entity q = new Entity("queueitem");
q["queueid"] = new EntityReference("queue", _QueueId);
q["objectid"] = contactRef;
_CrmService.Create(q);

The results were anything but.

The first time I executed this code it worked fine, created a new queueitem record and associated to my man Andrew.

The second time I executed this code, it exploded with the following message (which seems odd for a queue to do).

Read More


Creating a USD Configuration

When getting started with development in the USD (Unified Service Desk), the first thing you have to do is create a configuration profile (otherwise you get an error when you launch the USD).

A configuration profile is what allows you to create many types of USD implementations and associate them to users.  A user can only ever be associated to one profile.

USD_Config

Establishing a base configuration profile is comprised of three parts as indicated below.

usd

The Global Manager is a hosted control which

Read More