All,
Can someone tell me why this field isn't populated in CRM but can be written to the Console window? It's a text field. The value Address1 can be seen to the console window but when I check CRM, that field isn't populated.
C#:
var btaddress = (from saddress in xdoc.Descendants(ns + "Address")
where saddress.Element(ns + "AddressTypeCode").Value == "BT"
select saddress.Descendants()).FirstOrDefault();
var addrname = btaddress.Where(x => x.Name == ns + "Address1").FirstOrDefault();
Console.WriteLine("address "+addrname.Name.LocalName + " : " + addrname.Value);
salesorder["billto_line1"] = addrname.Value.ToString();
XML:
-<Address> <AddressTypeCode>BT</AddressTypeCode> <LocationCodeQualifier>91</LocationCodeQualifier> <AddressLocationNumber>09352</AddressLocationNumber> <AddressName>Nike Headquarters</AddressName> <AddressAlternateName>Attn: Headquarters</AddressAlternateName> <Address1>450 Sweet Drive</Address1> <Address2>Dock 199</Address2> <City>George Lake</City> <State>LA</State> <PostalCode>55328</PostalCode> <Country>USA</Country>