web
You’re offline. This is a read only version of the page.
close
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

Value cannot be null Parameter name: Input

(0) ShareShare
ReportReport
Posted on by 95

Dears,

I am getting the below error while creating a record in the custom entity. I have a plugin which will trigger on create of the record.. This issue is not happening at all the time. It's happening only for certain data. please help me with this.

Error log: 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Value cannot be null.
Parameter name: inputDetail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>260fac34-670f-4398-989a-37e1049c0a2a</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>Value cannot be null.
Parameter name: input</Message>
<Timestamp>2019-11-04T16:11:11.8127464Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>


</TraceText>
</OrganizationServiceFault>

I have the same question (1)
  • Suggested answer
    Thangamani Profile Picture
    507 on at

    Hi ,

    As you are telling that it is occuring for certain set of data so it is better to do profiling of this scenario and debug the plugin code and check each and every line execution outcome for different set of data.

    For profiler information,pls follwo the below link:

    dynamics365blocks.wordpress.com/.../

    mscrm-njl.blogspot.com/.../how-to-use-plugin-profiler-to-debug.html

    Hope this helps

    Regards,

    Thangamani

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Mahesh ,

    Is it possible to share plugin code ,

    Following are the possible root cause -

    - Not having proper null check while getting attributes value in the plugin code, make sure you are checking each attributes with contains. check here for sample code -shaikhd365.blogspot.com/.../how-to-get-all-types-fields-values-of.html

    - Secondly when you are calling the SDK method make sure are passing not null  values in the object to do the operations.

    - Are you trying to create Organization service proxy , if yes check here  -nishantrana.me/.../

    In addition as suggested above try to write some trace log  and enable tracing to identify which lines is failing and try to drill down the issue.

    docs.microsoft.com/.../logging-tracing

  • Suggested answer
    ajyendra Profile Picture
    1,738 on at

    Hi Mahesh,

    These issue is might be because you don't check for null value for the attributes(fields) in your plugin . That why its only happen for that data which contain null value . For resolving these issue make sure you can provide condition for null values. Provide you a link where you can see how to do through condition for all data type

    https://crm365blog.wordpress.com/2018/05/29/get-set-field-values-in-c-javascript-and-utility-functions/

  • shaikh sharef Profile Picture
    80 on at

    Also see this useful links.

    crmd365.wordpress.com/.../

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans