locked
Null Pointer Exception while Creating an Account in MS CRM? RRS feed

  • Question

  • Creating an account using MS CRM SDK

    private Dictionary<Guid, String> _recordIds = new Dictionary<Guid, String>();
    private OrganizationServiceProxy _serviceProxy;
    private IOrganizationService _service;
    
    public void createContact(){
    Account account = new Account
    {
    Name = "Fourth Coffee",
    Address1_StateOrProvince = "Colorado",
    };
    _recordIds.Add(_service.Create(account), Account.EntityLogicalName);
    }
    


    This is a snippet from SDK sample class CreateALinqQuery.cs
    Its giving me the Null pointer exception, How do I put values in _recordlds?

    Thanks


    Rana Muhammad Waqas


    Tuesday, September 16, 2014 8:34 AM