RE: Store parent account on Customer using eConnect
parentID.UpdateIfExists = 1; Will update any changes to the parent customer not the customer you are updating the parent information.
For updating the customer record you should set the flag for customertype
Dim cust As String = "CUSTNMBR9"
Dim econnect As New eConnectType
Dim customer As New RMCustomerMasterType
'Customer record
Dim customerrecord As New taUpdateCreateCustomerRcd
With customerrecord
.CUSTNMBR = cust
.CUSTNAME = "Customer Name"
.ADRSCODE = "PRIMARY"
.ADDRESS1 = "Address 1"
.ADDRESS2 = "Address 2"
.ADDRESS3 = "Address 3"
.CITY = "City"
.STATE = "State"
.ZIPCODE = "ZIPCODE"
.UpdateIfExists = 1
End With
customer.taUpdateCreateCustomerRcd = customerrecord
Then add the parent record to the customer
Dim parentobject As New taCreateParentID
With parentobject
.CPRCSTNM = cust
.NAALLOWRECEIPTS = 1
.NACREDITCHECK = 0
.UpdateIfExists = 1
End With
customer.taCreateParentID = parentobject
ReDim Preserve econnect.RMCustomerMasterType(0)
econnect.RMCustomerMasterType(0) = customer
Cheers!
Sanjay