web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Object Reference not set to an instance

(0) ShareShare
ReportReport
Posted on by

3276.Capture1.PNGwhen i am trying to create contact entity with only firstname field its throwing an error like this, here entity name is correct and field name is  correct...

help me to resolve this problem.

Thanks,

248588.Capture.PNG

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Harshad,

    When you create a contact entity, all the required fields should be given. The last name is a required field for contact entity. So you should always give this last name field while creating a contact in dynamics CRM.

  • Community Member Profile Picture
    on at

    But here last name is no business required..! Thanks for your reply

  • Suggested answer
    Community Member Profile Picture
    on at

    Is there any javascript or plugin on the contact form. Please paste the screenshot of your error. This kind of error occurs when there is no null check for a field

  • Community Member Profile Picture
    on at

    This error im getting in SSIS package only the firstname field is business required...

  • Community Member Profile Picture
    on at

    there is one plugin but in that i am checking that wheather the given email is valid or not if email is not valid then i am assigning to another field value as disabled...

    and one more thing when im directly creationg record in contact entity with only first name its eting created...

    please help to solve this issue

  • Community Member Profile Picture
    on at

    Share the code where it's throwing the error.

  • Community Member Profile Picture
    on at

    Entity contact = new Entity("contact");

               contact["firstname"] = "Mohamed";

               contact["lastname"] = "";

               contact["emailaddress1"] = "";

               Guid id=service.Create(contact);

  • Community Member Profile Picture
    on at

    An unhandled exception of type 'System.ServiceModel.FaultException`1' occurred in Microsoft.Xrm.Sdk.dll

    Additional information: Object reference not set to an instance of an object.

  • Community Member Profile Picture
    on at

    Please share the whole code block. Please enter some value in lastname and emailaddress instead of blank.

  • Community Member Profile Picture
    on at

    i need to create contact without email and last name onlt firstname is business required..

    and here im attaching the full code plz go through it and please let me know what is the error.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ZS-27011425-0 Profile Picture

ZS-27011425-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans