Category: Technology

Record in Multiple Queue Error in CRM 2011

While looking at Queue Item Details we were getting Error

Error:

“This record is in multiple queues. Go to specific queue to view details.”

Cause:

On doing the repro steps it was realized that this is the message that we get when a case is reactivated after being closed.

This is because a queue item related to same case is already there in CRM in deactivated state.

Resolution:

To resolve this we wrote a plugin to reactivate the queue item and assign it to a next level queue based on business logic.

Source Code to Reactivate Queue Item (Entity) in CRM 2011

[sourcecode language=”csharp”]

var entityMoniker = localContext.PluginExecutionContext.InputParameters[“EntityMoniker”] as EntityReference;

var incidentid = entityMoniker.Id;

QueryExpression query = new QueryExpression();

query.EntityName = “queueitem”;

query.ColumnSet = new ColumnSet();

query.ColumnSet.Columns.AddRange(new string[] { “statecode”, “statuscode”, “queueitemid” });

query.Criteria = new FilterExpression();

query.Criteria.AddCondition(“objectid”, ConditionOperator.Equal, incidentId);

query.Criteria.AddCondition(“statecode”, ConditionOperator.Equal, 1);

EntityCollection results = serviceContext.RetrieveMultiple(query);

if (results != null && results.Entities != null && results.Entities.Count > 0)

{

SetStateRequest setQueueItemState = new SetStateRequest();

setQueueItemState.EntityMoniker = new EntityReference(“queueitem”, results.Entities[0].Id);

setQueueItemState.State = new OptionSetValue(0);

setQueueItemState.Status = new OptionSetValue(1);

serviceContext.Execute(setQueueItemState);

}

[/sourcecode]

Repro Screenshots:

  1. Create case:

 

  1. Add it to queue


     

  2. Work On


     

  3. Resolve it


  4. Reactivate it:


  5. Add to queue Again


  6. Try to open queue item details.


     

     

    Error Message:

Import Solution Issue in UR 12

Recently we tried to import solution on CRM which was recently updated from UR 6 to UR 12.

Solution we had was taken from same server from a different org (after upgrade) and was getting stuck at the import step with no activity (at all) in progress bar.

Following Exception was there in CRM Trace log viewer

at CrmException..ctor(Int32 errorCode, Object[] arguments) ilOffset = 0x36

at SolutionImportProcessPage.ProcessRequestData() ilOffset = 0x4A

at SolutionImportProcessPage.ProcessAction(String action) ilOffset = 0x92

at AppUIPage.OnPreRender(EventArgs e) ilOffset = 0xD

at Control.PreRenderRecursiveInternal() ilOffset = 0x54

at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ilOffset = 0x6D3

at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ilOffset = 0x3C

at Page.ProcessRequest() ilOffset = 0x14

at Page.ProcessRequest(HttpContext context) ilOffset = 0x31

at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D

at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15

at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A

at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C

at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A

at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B

>Crm Exception: Message: An error occurred while importing a Solution., ErrorCode: -2147188685

To resolve this following post from Microsoft discussion forum helped

http://social.microsoft.com/Forums/en-US/crmdeployment/thread/755b7161-4ec3-40d1-bc37-776460656d9e

  1. Stop Async Service in services.msc
  • Run “services.msc”
  • Stop Async Service

     

2.  Take Microsoft.crm.sdk.proxy.dll from latest sdk

3.  Open Visual studio command line tools (in administrator privileges)

Run

gacutil /i c:sdkbinMicrosoft.crm.sdk.proxy.dll

do

4.  IIS reset, restart CRM Async Service in services.msc

Try importing the solution

 

PS: If you are in a farm deployment then Install Microsoft,crm.sdk.proxy.dll in the server running CRM Async Service.

Before installing dll, stop the async service, install dll in gac and restart async service.

 

CRM 2011 Unsupported Customizations

In CRM 2011 it’s not recommended to have unsupported customizations. But at times there is no way out of that.

Here are some unsupported customizations that I found useful.

  1. If you want to disable the View Picker or say you don’t want users to select any other view in lookup

     

     

    document.getElementById(“customerid”).setAttribute(“disableViewPicker“, “1″);

     

  2. To Hide search box from options

     

    document.getElementById(“customerid”).setAttribute(“disableQuickFind“, “1″); 

     

     

  3. Hide Complete Lookup Browser (Hilighted Part)


     

    document.getElementById(“customerid”).setAttribute(“_lookupbrowse“, “1″);

     

  4. Hide New Button on Lookup Form

     

     

    document.getElementById(“customerid”)._behaviours[0].AddParam(“ShowNewButton“,0);

     

  5. Changing Default lookup type in “Look for: ” drop down (Here setting to Contact “entity type code = 2” instead of Account)

document.getElementById(“customerid”).setAttribute(“defaulttype“, “2”);

  1. Setting particular lookup type in “Look for: ” drop down (Here setting to Contact “entity type code = 2”)

     

    document.getElementById(“parentcustomerid”).setAttribute(“lookuptypes“, “2”);

     

  2. Setting Lookup Type Name


    document.getElementById(“parentcustomerid”).setAttribute(“lookuptypenames“, “contact:2”);

     

  3. Setting Icon to be displayed in Lookup box (after selecting)


    document.getElementById(“parentcustomerid”).setAttribute(“lookuptypeIcons“, “/_imgs/ico_16_2.gif”);

Windows Phone Emulator Error

While trying to run Windows Phone emulator I was facing given error.

The Windows Phone Emulator wasn’t able to create the virtual machine: Something happened while creating a switch: Xde couldn’t find an IPv4 address for the host machine

.

Simple Resolution to this problem is:

  • Run Hyper-V Manager as Admin



  • Go to Action > Virtual Switch Manager.


  • Click on “New Network Switch’


  • Select Internal and Create Virtual Switch


  • Give Name of Virtual Switch as “Windows Phone Emulator Internal Switch”


  • Click “OK” and restart your machine.

    After following these steps you should be able to run Windows Phone 8 Emulator without any issue.

    In case it solves/ doesn’t solve your problem mention that in comments.


Connection Error in CRM 2011 Plugin

ReceRe

Recently one of my colleagues was facing an issue while executing a plugin in CRM 2011 OnPremise environment. In his plugin he was trying to push some data from CRM to Facebook using webservice exposed by Facebook.

 

The Web Service plug-in failed in OrganizationId: e04e7680-a484-e211-8a47-00155d8863b2; SdkMessageProcessingStepId: 1e269463-4795-e211-adef-00155d8863b2; EntityName: new_post; Stage: 20; MessageName: Create; AssemblyName: XYZ.Plugin.PushToFacebook, XYZ.Plugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c345a3907d3249f7; ClassName: XYZ.Plugin.PushToFacebook; Exception: Unhandled Exception: System.Net.WebException: Unable to connect to the remote server

   at XYZ.Plugin.PushToFacebook.Process(String message, String facebookPathPostId, IOrganizationService service)

   at XYZ.Plugin.PushToFacebook.Execute(IServiceProvider serviceProvider)

   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)

   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

Inner Exception: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 31.13.77.39:443

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

 

He complained that same plugin worked fine for him in OnLine scenario but failed in OnPremise.

 

In this particular scenario exception message clearly said that “A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond” the connection was not getting established properly

Things which could be causing problems:

  1. No Internet Exception – Check à Machine was connected to internet, he was able to explore service through browser
  2. Firewall – Check à Exception was set for specified ports for both inbound and outbound.
  3. Proxy – Check à It was set in LAN Settings in browser (Oooopsssss….)

 

So here was the problem, proxy was set for browser, not system/environment wide. So I asked him to use WebProxy object to make his call from plugin via proxy server and everything started working fine.

 

You can go through given link for looking into webproxy object:

http://msdn.microsoft.com/en-us/library/system.net.webproxy(v=vs.90).aspx

 

Do comment if you find same exception and this solution doesn’t work.

Self-Hosted Alternative to Google Reader

With Google pulling the plug of my all-time favorite Google App “Google Reader” and people fighting over the right/wrong Google did by stopping the service, it was high time to find a good alternative to Google Reader. After a long search and using multiple different services like Feedly, oldrssreader etc… there was no service that satisfied me.

Closest thing I could find to what I liked was OldRSSReader but it was very slow and had lots of down time. Further it was missing various features that I would love to see in a good Google Reader alternative.

Further search led me to “Tiny Tiny RSS” reader, good thing about it was that I loved it at first usage J so I hosted it on my own server.

Here is, “BemusedMe Reader” the latest alternative available to you all “Google Reader” fans, As of now I’ve limited maximum users as its still is in its alpha stage and I’ll be working on it in my free time and will try to improve it.

Thanks to Andrew Dolgov for this wonderful application.

 

PS: I don’t have any experience in PHP programming so future updates may be screwed up. Use at your own risk.

In Case you can’t register reach out at connect@bemusedme.com, I’ll try to provide you access.

Disabling Inline Editing/ Quick Editing in SharePoint 2013 List

In SharePoint 2010 when we create a Custom list by default inline Editing or as it’s called in SharePoint 2010 “Datasheet Editing” is disabled.

In SharePoint 2013 similar feature is there and it is enabled by default.

To disable Inline or as it’s called “Quick Editing”

  1. Go to “List Settings”

  1. Advanced Settings

  2. Scroll down and Set “Quick Edit” to No

MS Dynamics CRM : First Stupid Issue

I’ve just started Learning Microsoft Dynamics CRM. I know CRM 2011 is out but its certification is not. So I planned on learning CRM 4.0 first so that I can be certified :)

While learning I have just reached Page 1-6 of student manual for Configuration and customization and I am stuck up on an error while creating the user.

I am creating a new user and I’ve entered my data in the textbox and it is giving following error.

So from error it is clear that before adding a user to CRM it should be available in domain :) .

Cool so from above: Simple solution.. Go to Active Directory Users and Computers (in Administrative template). Create a new user, Now in CRM add user with same logon name as that in active directory and BINGO………. It gives the same error :) …..

Ok now add domain infront of logon i.e. / and its a BINGO :) .

Cool simple issue with more than simple resolution, but one question : Why we can’t add any user who are not there in any domain. May be thats too stupid to be a question to ask as if user is not there in AD you can’t authenticate it then it will be an issue with security and BLAH BLAH BLAH …… but still one day I’ll look into this issue : Is it feasible to add users in CRM who are not in active directory and If yes HOW? and if no HOW to make it feasible ?

But right now the highest priority is to learn CRM enough to complete certification (without dumps ofcourse…. other wise I would be sitting in some pub with Beer and not caring about this stupid stuff here )

Ok Forum….. Bbyeeeeee……… will be soon back with other weirdo and stupid issue :D .

MS Dynamics CRM : First Stupid Issue

I’ve just started Learning Microsoft Dynamics CRM. I know CRM 2011 is out but its certification is not. So I planned on learning CRM 4.0 first so that I can be certified :)

While learning I have just reached Page 1-6 of student manual for Configuration and customization and I am stuck up on an error while creating the user.

I am creating a new user and I’ve entered my data in the textbox and it is giving following error.

So from error it is clear that before adding a user to CRM it should be available in domain :) .

Cool so from above: Simple solution.. Go to Active Directory Users and Computers (in Administrative template). Create a new user, Now in CRM add user with same logon name as that in active directory and BINGO………. It gives the same error :) …..

Ok now add domain infront of logon i.e. / and its a BINGO :) .

Cool simple issue with more than simple resolution, but one question : Why we can’t add any user who are not there in any domain. May be thats too stupid to be a question to ask as if user is not there in AD you can’t authenticate it then it will be an issue with security and BLAH BLAH BLAH …… but still one day I’ll look into this issue : Is it feasible to add users in CRM who are not in active directory and If yes HOW? and if no HOW to make it feasible ?

But right now the highest priority is to learn CRM enough to complete certification (without dumps ofcourse…. other wise I would be sitting in some pub with Beer and not caring about this stupid stuff here )

Ok Forum….. Bbyeeeeee……… will be soon back with other weirdo and stupid issue :D .