Showing posts with label Microsoft Dynamics CRM Errors and Resolution. Show all posts
Showing posts with label Microsoft Dynamics CRM Errors and Resolution. Show all posts

Wednesday, June 3, 2020

We were trying to connect Dynamics 365 instance from inside a corporate network which was having security restrictions.

It allowed outbound calls only through a proxy server. So when we tried to connect D365 using the SDK, the following error message was received.

Error Message

One or more errors occurred. => An error occurred while sending the request. => The remote name could not be resolved: 'xxx.crm4.dynamics.com'ERROR REQUESTING Token FROM THE Authentication context ERROR REQUESTING Token FROM THE Authentication contextNeed a non-empty authority Parameter name: AuthorityUnable to connect to CRM: Need a non-empty authority Parameter name: Authority Need a non-empty authority Parameter name: AuthorityUnable to Login to Dynamics CRM Unable to Login to Dynamics CRMOrganizationWebProxyClient is null OrganizationWebProxyClient is nullOrganizationWebProxyClient is null OrganizationWebProxyClient is nullOrganizationWebProxyClient is null OrganizationWebProxyClient is null

Resolution

Put the following in the config file and update the proxy address accordingly.

<system.net> <defaultProxy useDefaultCredentials="true" enabled="true"> <proxy usesystemdefault="true" proxyaddress="http://my-proxy.com:3128" /> </defaultProxy> </system.net>

For connecting to D365 using SDK, see my other blog at CrmServiceClient: Authenticate an Active Directory Account (ADFS) with CRM Online / Dynamics 365.

Wednesday, July 1, 2015

Microsoft Dynamics CRM Errors and Resolution

Following is the list of errors that I encountered and fixed. Might be helpful for some of you.

Error 1

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: exception in MyTest plugin, Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220891</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>OperationStatus</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>SubErrorCode</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>exception in MyTest</Message>
  <Timestamp>2015-04-23T11:01:06.2611421Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>


The plugin triggered on create of the record; on post-operation. From the "Target" parameter in the plugin, we were getting the current entity record in a variable, updating its few fields and calling the Update method of the Organization Service; passing in the same variable that was initialized with the Target record .



Resolution

To update the entity fields, create a new entity object, set the Id to the Id of the Target object, set the required fields to update and call the Organization Service Update method. That should fix the issue.