Incorrect attribute value type Microsoft.Xrm.Sdk.OptionSetValue - dynamics-crm-2011

While creating an Incident. I am facing this issue. I have created some incidents and it working fine but sometime it shows this exception "Incorrect attribute value type Microsoft.Xrm.Sdk.OptionSetValue".
How to trace which OptionSetValue throws an error.

I'm going to assume that you're creating these via a C# sdk call. I believe turning on server side tracing would tell you. The other option is if you can debug it locally, catch the exception and manually attempt to update each optionset attribute, one at a time until you find the culprit.

Related

ListView in sharepoint 2013

I am getting following error when I use pagination of view.
Unable to render the data. If the problem persists, contact your web
server administrator.Correlation
ID:c64a4e9d-64d2-3009-f658-7f1c8b0faebc
When I checked the Logs from ULSViewer I got these errors messages
Error while executing web part: System.ArgumentException: The
specified view is invalid. at
Microsoft.SharePoint.SPViewCollection.get_Item(Guid guid) at
Microsoft.SharePoint.ApplicationPages.InplaceViewEditor.get_View()
at
Microsoft.SharePoint.ApplicationPages.InplaceViewEditor.RenderListView()
at
Microsoft.SharePoint.ApplicationPages.InplaceViewEditor.Execute(String
strCmd) at
Microsoft.SharePoint.ApplicationPages.InplaceViewEditor.OnLoad(EventArgs
e)
Forced due to logging gap, cached # 12/24/2015 10:59:32.88, Original
Level: Verbose] No data was found on the incoming client request
Proxy response returned error: 'The remote server returned an error:
(601).'
Could you please check and let me know what is the issue? I am not able to resolve it.
Thanks in advance.
Best Regards,
Manoj.
Have you added the custom web parts or add custom code?
For troubleshooting the issue, you could check things below:
Create a new list view to check if the same issue will occur.
Do an IIS reset to check if it can work.

Unable to fail C# test using assert.fail method

I am creating a test in codedUI, VS2013. I am using assert.fail(failuredescripion) inside my exception class. But I am getting the below mentioned error:
An exception of type 'Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException' occurred in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll but was not handled in user code
Additional information: Assert.Fail failed.
Can anyone please suggest how to achieve this?
I want the failure to be recorded forcefully.
I found answer from this MSDN post
This error is happening because of the exception options. Need to add an exception for the assert namespace and disable both user handled and Thrown in Debug-->Exceptions

AccessViolationException thrown when running Azure web role under the Azure emulator

I am getting a System.AccessViolationException thrown during the execution of an Azure Web Role (run on the Azure emulator, this has not been uploaded to Azure yet) when a call is made to an overridden method of an object when a local int variable is passed as one of the method parameters. The exception message is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
The code where the exception is thrown is part of a local library that has been used for several years on live systems (not Azure) with no issues. The part that errors is as follows:
foreach (XmlDataComponent item in this.items)
{
int index = 0;
XmlNode node = item.ToXml(dataSet, xmlDocument, this, index); // Exception thrown when this call is made
...
}
The XmlDataComponent is a base class, when the code runs item is one of its derived classes. The ToXml() method is overridden in the derived classes. The exception is thrown as soon as the call is made to ToXml().
The problem is the index parameter. If I swap this to use an explicit value instead of the local variable, e.g.
item.ToXml(dataSet, xmlDocument, this, 0)
there are no errors.
Similarly, if I cast the item to its actual type e.g.
((XmlDataItem)item).ToXml(dataSet, xmlDocument, this, index))
and mark the ToXml() method in the XmlDataItem class as new instead of override there are no errors.
I have also tried calling the library from a console application rather than a web role with exactly the same data (i.e. everything the same other than running under a web role). Again, this caused no problems.
It appears that when run under the Azure emulator, accessing a local variable as a parameter to an overridden method is an issue!!!
I'm hoping this is only an issue when run under the emulator, however we still need a fix otherwise dev is more difficult.
Any suggestions or advise would be much appreciated.

SoapHttpClientProtocol automatically retry after exception?

I am just curious about this. I am making a change in this project, that is using NetSuite web service, and sometimes it throws a SoapException at random, "Only one request may be made against a session at a time".
private NetSuiteService _service;
SessionResponse response = _service.login(passport); //if SoapException, retries??
Status status = response.status;
Reference.cs:
public partial class NetSuiteService :
System.Web.Services.Protocols.SoapHttpClientProtocol
My question is: If I am in debug mode, I trace this, and I hit F5, and it seems to automatically retry after exception is thrown (the code keeps running, with no try catch block implemented, no while loop) until successful (status.isSuccess == true). When I run it in release mode, as a windows service, the log shows it stops running after exception is thrown.
How is this possible? Is it better to catch this exception in a try catch block and retry?
NS Server refuses a request if its already processing one from the same user.
If you want to make sure that your request succeeds than you have to catch this exception and retry.
This was not the experience I had. We thought this related to netsuite sessions but turned out to be nothing to do with that at all and in fact was not even hitting netsuite (according to netsuite log)​​. Turned out we were trying to execute too many commands in a single request and it totally refused to send it to netsuite. Never seen this error before, may be it is a new thing with the new version!

GWT browser returns an error, but GWT does not

I made some changes to GWT app without testing it in the client browser. I just now tested it in the browser and now the browser is throwing an error:
Error: uncaught exception: java.lang.IllegalArgumentException: Widget must be a child of this panel.
How do I figure out why this is being thrown and where to fix it?
I made so many changes in the code between now and last time I tested to figure out where it could possibly be from memory.
Any help would be greatly appreciated.
This error message is thrown (at least) by an AbsolutePanel if you try to call setWidgetPosition, getWidgetLeft or getWidgetTop with a widget as argument that's not a child of the AbsolutePanel. Maybe you call the method before you attach the widget to the Panel.
For debugging you can try the following:
Run in hosted mode and set a debug pointer on the IllegalArgumentException.
Or if you only can find it in client code. I compile with -style pretty and run it in Firefox with FireBug debugger and set Script to break on errors or track throw/catch.

Resources