Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

How to understand field which is causing plug in error using the Log file generated by CRM

(0) ShareShare
ReportReport
Posted on by 647

Hi,

How to understand  field which is causing plug in error using the Log file generated by CRM below.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=21bg3856ad364e35]]: Object reference not set to an instance of an object.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>90ec17b4-8058-460d-b0d3-96cc45e557f5</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Object reference not set to an instance of an object.</Message>
<Timestamp>2020-07-16T12:15:23.3367231Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>
[OrgPlugins: Orgapital_CRMPlugins.KYC.KYC_40]
[9cc0564c-9702-e911-80e8-004446b9133f: Orgapital_CRMPlugins.KYC.KYC_40: Update of Vend_KYC]

[ProfilePlugin: ProfilePlugin.Pre_Profile]
[7g3fc8fe-cb15-ea11-80e2-0050569f1e1e: ProfilePlugin.Pre_Profile: Update of contact]

</TraceText>
</OrganizationServiceFault>

  • Integration Profile Picture
    Integration 647 on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Hi,

    Surprisingly with out any change of code in plugin etc, just by opening the site in other browsers(FireFox) instead of IE this issue got solved for this record.

    Strange but this worked for us.

  • Integration Profile Picture
    Integration 647 on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Hi,

    This is a third-party plug-in, we informed them to look into this issue further.

    As OOTB CRM logs not given any exact issue or field  informatio which might causing this error.

    Thanks,

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,231 on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    It seems like you are adding null value or reference in keyvaluepair(Dictionary).

    Can you please check in your code that you have added contains to check if field is having value.

    For ex.

    Guid RecordId= EntityName.Attributes.Contains("FieldLogicalName") ? EntityName.GetAttributeValue<EntityReference>("FieldLogicalName").Id: Guid.Empty;

    string FieldName= EntityName.Attributes.Contains("FieldLogicalName") ? EntityName.GetAttributeValue<string>("FieldLogicalName") : string.Empty;

  • RE: How to understand field which is causing plug in error using the Log file generated by CRM

    What Bipin Kumar shares is the right direction:

    Based on the error I suspect null check is missing in your code. Also check if you forgot to check field contains data.

    It is very likely that is the issue based on the context provided. 

  • Integration Profile Picture
    Integration 647 on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Hi,

    Tried copying the error related record to our test environment, unfortunately  same record not throwing any error in test environment.

    And only in live environment we are still facing same error or error log.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Hi,

    If it is happening for one record, can you please manually create replica of the same record from production to your dev instance and debug your plugin.

    Based on the error I suspect null check is missing in your code. Also check if you forgot to check field contains data.

    As Andrew suggested if possible share your plugin code to investigate this issue further.

    If found helpful, Please mark my answer verified.

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    You can re-read my last reply. I have nothing to add.

  • Integration Profile Picture
    Integration 647 on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Hi,

    Can we figure out the issue.

    By using the Error logs generated by CRM system out of the box.

    I tried to understand from the log file, but its not giving any information regarding which field is causing this issue from the entity.

    4048.Capture.JPG

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Then... if you don't want to debug the plugin the only way for you is to update the plugin and add traces to it to figure out what is going wrong. What you also can do is to put the plugin here and if the source of error is obvious and plugin doesn't have gazillion of lines - I will try to help.

  • Integration Profile Picture
    Integration 647 on at
    RE: How to understand field which is causing plug in error using the Log file generated by CRM

    Hi,

    We dont want to debug the plug in, as this error occurring only in production for one specific record.

    I tried Enabling "Plug in Trace" log under System->Customization. But no plug in error logs getting created in CRM.

    Even though error reproduced.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,492 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans