1
Vote

Case Attributes

description

Hi,

I'm hoping there is still some activity regarding this tool.

Basically, I have the queue manager running against CRM 2011, everything works except trying to set any case attributes which are option sets.
Setting case attributes that are of type string works no problem, however with option sets (all of them) I receive an Incorrect attribute value type System.Int32 error. I have checked multiple times & the value I am passing in the config file definitely exists & is published, I have actually tried with all values but none of them work.
The value I am trying to pass in the config file is;

caseattributes="casetypecode#100000000"

Have also tried using 1, 2, 3, 200014, 200015 etc as per the values I have stored within the option set.

Thanks,

James

comments

Jhawes wrote Dec 11, 2013 at 3:06 PM

Ok, got it working, I'm unsure if the executable provided is written originally in VB or C#, but I converted the QueueManager.Service.exe into source, then within the QueueMonitor.cs file, changed the case for when an attribute data type is picklist from;

case AttributeTypeCode.Picklist:
objCase.Attributes.Add(strArray[0], (object) int.parse(strArray[1]));
break;

to;

case AttributeTypeCode.Picklist:
int value = int.Parse(strArray[1]);
objCase.Attributes.Add(strArray[0], new OptionSetValue(value));
break;

I also had to amend a number of lines regarding the conversion of ints to bool values, in other files.

Now just need to look at why it's not creating contacts.

Thanks,

James

Jhawes wrote Dec 11, 2013 at 3:06 PM

Sorry forgot to mention, I converted mine to c# source