Adding an email address to a customer RRS feed

  • Question

  • Hello,

     I am using GP Web Services via C# to add customers and customer addresses. This is working Ok as I am using the Native examples from the programmers guide.

     However when I try to add an email address using the a construct such as in the code below, I am running into

     "object reference not set errors".  The intelli-sense will not let me define a further child object, and iNet[0].EmailAddress appears to accept a string as an assignment.

     What is the correct construct for adding an email address to a Customer Address?

     Thanks Stephen

     InternetAddresses[] iNet = new InternetAddresses[1];
    iNet[0].EmailToAddress = ""; // Some email address
    customerAddresses[0].InternetAddresses = iNet[0];

    Friday, February 14, 2014 10:45 PM