![]() | |
ConneXionInsertCustomer Method |
Namespace: ConneXion
NOTE: The fields REQUIRED by ConneXion to insert a Customer are Name, Agency and Branch. When inserting a Commercial Customer, CustomerType should be set to 2. If it is not, ConneXion will assume it is a personal customer and create the Customer ID accordingly.
Dim oCustomer As New ConneXion.Customer Dim oConneXion As New ConneXion.ConneXion Dim oResult As ConneXion.ConneXionResult oCustomer.LicenseKey = "123456 1" oCustomer.Name = "Joseph W. Abbot" oCustomer.Attention = "" oCustomer.Street = "1414 Hampton Road" oCustomer.City = "Homewood" oCustomer.State = "IL" oCustomer.ZipCode = "60430" oCustomer.Heading = "Joe & Elaine" oCustomer.Occupation = "RETIRED" oCustomer.Note = "CL-" oCustomer.Classification = "P1" oCustomer.Conglomerate = "" oCustomer.PhoneResidential = "708-798-8345" oCustomer.PhoneBusiness = "" oCustomer.PhoneFax = "" oCustomer.Email = "joe@abbot.us" oCustomer.Agency = "1" oCustomer.Branch = "1" oCustomer.CSR = "JS" oCustomer.Producer = "RFN" oCustomer.Classification = "P1" oCustomer.Broker = "ALEXGR1" oCustomer.CustomerType = "1" oCustomer.InvoicePageBreak = "2" oCustomer.MarketingPlan = "CRS" oCustomer.ServiceCharge = "True" oCustomer.Statement = "-102.40" oCustomer.DunningLetterDate = "090103" oCustomer.TAMUserName = "EXEC" oCustomer.TAMPassword = "PSWD" oCustomer.TAMCentralAgency = "DEMOAG1" oResult = oConneXion.InsertCustomer(oCustomer) txtID.Text = oCustomer.CustomerID If oResult.Success = True Then MessageBox.Show("InsertCustomer is Successful") Else txtResult.Text = "Number: " & oResult.Number & vbCrLf & "Desc: " & oResult.TAMDescription & oResult.Description & vbCrLf & "TAMErrorNumber: " & oResult.TAMErrorNumber End If