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 !!
Recently we were getting the Generic SQL Error in one of our Plugin which was registered in Create of Opportunity Line.
The scenario was that on qualifying the lead, opportunity was getting created and we had Async Plugin on Create of Opportunity that will create an Opportunity Line and had Sync Plugin on Create of Opportunity Line that was updating the parent Opportunity. This issue was occurring randomly.
We observed the following, that if both the Plugin are registered as Sync or Async the issue doesn’t occur. It also doesn’t occur if we have Opportunity Plugin on Create as Sync and the one on Opp. Line as Async.
The other way of solving the issue was to introduce delay before updating the Parent Opportunity from the child opportunity line create Plugin.
Hope this helps..