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 :
Microsoft Dynamics CRM (Archived)

System.ArgumentNullException: Value cannot be null. Parameter name: g

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have created Custom entity on CRM 2015 Update 1 system, it was working fine but suddenly I'm getting below error, 

Error :

An error has occurred. Try this action again. If the problem Continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

As you can see above error is not saying anything in details it is just the generic error.

When I go to a quick create of custom activity then I have received below error,

Error description :

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #E78B7108Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #E78B7108</Message>
<Timestamp>2015-10-02T09:11:47.2130877Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.ArgumentNullException: Value cannot be null.
Parameter name: g</Message>
<Timestamp>2015-10-02T09:11:47.2130877Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>

Your help is appreciated.

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    keoma Profile Picture
    32,729 on at

    it seems that this is a serialization/deserialization issue with your custom entity. what is parameter g ? which type is it (simple/complex) ?

    follow community.dynamics.com/.../166308 and best you contact Abhishek Bakshi directly. he had a similar error and started a ticket at MS support.

    also follow

    blogs.msdn.com/.../crm-2011-sdk-error-while-using-the-create-method-system-argumentnullexception-value-cannot-be-null.aspx

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Pratik,

    This is usually a bug coming from a custom plugin. Do you have any plugins registered on your custom entity, or maybe a synchronous workflow that calls a custom workflow step? If you have plugins registered, disable them via the plugin registration tool and retest it.  When you see this error coming out of a c# assembly the most likely case is you're passing around a null value to your methods and it's expecting something. ex: A method takes the most recent sales order for a customer but there are no orders.

    If this was helpful I'd appreciate if you would mark this as a verified answer.

    Thanks,

     Aiden

  • Community Member Profile Picture
    on at

    Hi Aiden & jonathan

    Thanks for your interest & response to above question.

    @Aiden : Neither I don't have any custom plugin registered with custom entity nor synchronous workflow.

    @Jonathan : Thank you for sharing Abhishek Bakshi's post, I have already seen it & tried to contact him, as you can see I have posted  comment on his post already.

  • Verified answer
    Community Member Profile Picture
    on at

    I have solved above issue & good news is my custom entity working fine now.

    In case anybody struggling with the same issue then try out below thing, this is what MS said, 

    In the meantime I checked the traces from our live meeting and I found a “ClassId is not set on the following control: placeHolder_{beb58444-cb68-b694-6da9-212b73d2dd5a}_{d7c1603b-c1ab-857c-497c-8277733ba03b}” error. I then checked the customizations.xml file from the solution you sent and found the above mentioned placeholder without a classid defined. The error from the trace is straight forward. Every control in the form needs to have a classId defined. If this is not defined, you will run into the above error. Based on this, I commented the following bid of xml on the customizations.xml file of the 'CustomEntity' solution entity you sent:

    <cell id="{306a305c-d9b8-6733-5c76-de20b7888c4b}" showlabel="false">
    <labels>
    <label description="" languagecode="1031" />
    </labels>
    <control id="placeHolder_{beb58444-cb68-b694-6da9-212b73d2dd5a}_{d7c1603b-c1ab-857c-497c-8277733ba03b}" />
    </cell>

    Regarding the solution:
    - On the test environment I confirm that the error now was related to other placeholder like I suspected
    - I edited the customizations.xml in order to comment the 2 corrupt placeholder
    - This failed again with a different placeholder
    - Once on the particular section was more than 10 placeholders, I decided to comment the entire section and this action resolved the issue. After importing the solution with the commented section I can now open the forms and create new ones on the 'CustomEntity' entity.

    Happy hours !!!

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans