locked
CRM 2013 create the record in Lead entity RRS feed

  • Question

  • Hi All,

    I just want create the new records in lead entity while clicking the button in asp.net

       protected void butLead_Click(object sender, EventArgs e)
            {
                Entity newlead = new Entity("lead");
               // Entity newContact = new Entity("contact");
                newlead["firstname"] = "John";
                newlead["lastname"] = "Smith";
                _service.Create(newlead);
               
            }

    but while clicking the i am getting  followi

    ng error message

    object reference not set to an instance of an object
    Pls suggest me

    Rammohan

    Monday, August 25, 2014 4:17 AM

All replies

  • http://social.microsoft.com/Forums/en-US/0f7ad093-7133-455e-8319-16ae6f8f82e5/crm-40-object-reference-not-set-to-an-instance-of-an-object-when-publishing-andor-deleting?forum=crmdevelopment

    http://stackoverflow.com/questions/20134280/object-reference-not-set-to-an-instance-of-an-object-c-sharp-error

    https://community.dynamics.com/crm/b/hardworkdays/archive/2013/10/28/actions-input-parameters-and-object-reference-not-set-to-an-instance-of-an-object-exception.aspx

    check it.


    ms crm

    Monday, August 25, 2014 6:09 AM