Got this error while trying to import a managed solution in CRM 2016 Online.
During analysis we figured out that it was pointing to one of the charts created for System User Entity. It seemed like chart’s xml was modified after export and then imported. The xml definition of the chart contained distinct keyword.
Removing the distinct keyword from the Chart definition and importing it back and then importing the managed solution with this updated chart got imported without any error.
Hope it helps..
Today we faced this issue while importing managed solution extracted from our Dev Environment to Test Environment (CRM 2016 Online Update 1).
As suggested by few of the posts online, the culprit was the System Customizer role. We removed it from our solution and then imported it back and it got imported successfully.
Hope it helps..
We had one of our plugins on Create of Opportunity however during the import of the Opportunity record it was not working properly. We had the Depth check in our plugin code to check for infinite loop as the same plugin was being used for Update also.
After some debugging we realized that Depth value is 2 instead of 1 during import.
To test this, we created a sample plugin for create of Test entity record and then imported the Test entity records.
As expected the import failed and we got our custom exception in it.
Hope this helps..
Recently had a requirement to set Access Mode of around 500 users to Administrative from Read – Write. We wrote an on demand workflow for that. However, running that workflow on those 500 records in a batch of 100 records was causing them to stuck in waiting stage and we had to then manually resume those workflow instance. So we ended up writing a Console Application for that.
QueryExpression queryExpression = new QueryExpression();
queryExpression.EntityName = "systemuser";
queryExpression.ColumnSet = new ColumnSet();
ConditionExpression conditionExpression1 = new ConditionExpression();
conditionExpression1.AttributeName = "tk_businessarea";
conditionExpression1.Operator = ConditionOperator.Equal;
ConditionExpression conditionExpression2 = new ConditionExpression();
conditionExpression2.AttributeName = "isdisabled";
conditionExpression2.Operator = ConditionOperator.Equal;
// access mode ==> 0 --> Read Write and 1 --> Adminstrative
ConditionExpression conditionExpression3 = new ConditionExpression();
conditionExpression3.AttributeName = "accessmode";
conditionExpression3.Operator = ConditionOperator.Equal;
queryExpression.Criteria.FilterOperator = LogicalOperator.And;
EntityCollection entityColl = organizationProxy.RetrieveMultiple(queryExpression);
foreach(var entity in entityColl.Entities)
Entity userEntity = new Entity("systemuser");
userEntity.Id = entity.Id;
userEntity.Attributes["accessmode"] = new OptionSetValue(0);
Hope it helps !!