serving the solutions day and night

Pages

Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Wednesday, July 31, 2013

Dynamics CRM - Cross-Site Scripting Filter

In CRM, if your customization fetch xml contain extra attribute name which is does not belong in the Saved View, then IE will throw
"Internet Explorer has modified this page to help prevent cross-site scripting. Click here for more information... "



Example
Saved View contains - firstname, lastname
Cusomization fetch XML contain middlename
var fetchBaseXML = '<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">';
            fetchBaseXML += '    <entity name="contact">';
            fetchBaseXML += '        <attribute name="middlename" />';
            fetchBaseXML += '        <attribute name="lastname" />';
            fetchBaseXML += '        <attribute name="firstname" />';
           
Solution 1
Remove the attribute name from the customization fetch OR Add the attribute name in the Saved View.

Solution 2
Click Tools > Internet options > Security and click the Custom Level... button.
Scroll down the list and click the Disable radio button for the Enable XSS-filter option.
Restart the browser.
Click the Submit button again in the Report Administration screen in Maximo, and the SmartCloud Cost Management reports are now displayed.


Monday, May 6, 2013

Dynamics CRM 2011 - Globally Define Error Report Preferences

Dynamics CRM will throw error, like below the image.
If you receive a lot of errors like this while using Dynamics CRM 2011, you may already know that you can change your personal options to automatically send these error reports to Microsoft, or to never send this. This will mean those errors will not pop up on your screen anymore as they will automatically be handled.


Wednesday, April 17, 2013

XRM Data Transfer Error

Error 1
System.InvalidOperationException: Sequence contains no matching

Solution
PickList or OptionSet value is missing or Number  not matched

Error 2
System.Data.SqlClient.SqlException (0x80131904): Timeout expired.

Solution
Add DNS.dbml -> DNS.designer.cs -> DNSDataContext method
partial void OnCreated()
{
    //Set the timeout value to 300 = 50 Min.
    base.CommandTimeout = 3000;
}

Monday, March 18, 2013

Dynamics CRM Import Solution Failure

Failure Error:- An item with the same key has already been added.

Because of "duplicate field names", there are 2 possible causes.
1)Duplication has occurred between a custom field, and a virtual field

CRM creates an additional attribute in the metadata for the text of the field for certain field types (boolean, picklist and lookup). This attrbiute is not physically stored, and is considered to be a 'virtual' field. The virtaul attribute has the name of the base field + a suffix of 'name'.
For example,
the addresstypecode picklist field  => addresstypecodename virtual field
new_parentcustomerid custom lookup field  => new_parentcustomeridname virtual field.

CRM will let you do this, but the import could fail.

The following script will list of any duplicates, run in the METABASE database

select
    e.name as entity, a.name as attribute, count(*)
from
    attribute a join entity e on a.entityid = e.entityid
group by
    e.name, a.name
having count(*) > 1

Wednesday, November 21, 2012

IncludeExceptionDetailInFaults - Display Hidden Error

Create a simple web application to add contact data into the CRM system using c# and IOrganizationService Web Service.

1)Create Empty web application

2)Add References
microsoft.xrm.sdk.dll
microsoft.crm.sdk.proxy.dll
System.Runtime.Serialization
System.ServieModel