intuit partner platform - IPP Create Customers Never Appears in QBD -
i trying add customer , invoice quickbooks, neither appear. quickbooks responds xml:
my code adding customers , invoices appears work , see no errors:
public customer buildcustomeraddrq(jmaorder _order) { // construct subordinate required records //buildstandardtermsaddrq("web order"); // build main customer record customer qbcustomeradd = new customer(); var customer = _order.billingaddress; var billing = _order.billingaddress; physicaladdress phy = new physicaladdress(); // if setting orders go under same customer id, push // address lines down 1 , store customer name on address line 1. if (_qbosettings.customerid == "singlename") { qbcustomeradd.dbaname = "web store"; qbcustomeradd.email = new emailaddress[] { new emailaddress() { address = "info@webstore.com", tag = new string[] { "business" } } }; qbcustomeradd.givenname = "web"; qbcustomeradd.active = true; qbcustomeradd.familyname = "store"; phy.line1 = "web store"; phy.line2 = ""; phy.tag = new string[] { "billing" }; } else { //qbcustomeradd.dbaname = getcustid(_order); qbcustomeradd.email = new emailaddress[] { new emailaddress() { address = customer.email, tag = new string[] { "business" } } }; qbcustomeradd.givenname = customer.firstname; qbcustomeradd.active = true; qbcustomeradd.familyname = customer.lastname; if (!string.isnullorempty(customer.phonenumber)) { qbcustomeradd.phone = new telephonenumber[] { new telephonenumber() { freeformnumber = customer.phonenumber, tag = new string[] { "business" } } }; } phy.line1 = billing.address1; if (!string.isnullorempty(billing.address2)) { phy.line2 = billing.address2; } phy.city = billing.city; if (billing.regionname != null) { phy.countrysubdivisioncode = billing.regionname; } phy.postalcode = billing.postalcode; phy.country = billing.countryname; phy.tag = new string[] { "billing" }; } // build add request , exit qbcustomeradd.address = new physicaladdress[] { phy }; try { customer cu = dataservices.add(qbcustomeradd); return cu; } catch (exception ex) { errormessagedatasource.insert(new errormessage(messageseverity.error, "qbo", string.format("error adding customer : {0}", ex.tostring()))); customer ct = new customer(); return ct; }
when run intuit sync manager, see no new customer or invoice. possible add new customers quickbooks?
it appears customer entered quickbooks in error state. needed add qbcustomeradd.name field.
customerquery cq = new customerquery(); cq.erroredobjectsonly = true; var blist = cq.executequery<customer>(dataservices.servicecontext);
Comments
Post a Comment