Author Topic: Invalid Parent Specified  (Read 973 times)

johnlewisdesign

  • Member
  • *
  • Posts: 81
Invalid Parent Specified
« on: January 15, 2014, 10:06:51 AM »
Hi guys

I have a bit of a problem. I'm trying to send a job for the first time. I have referred to the OSR and seem to have valid XML. I have got the correct ListID at top level. Under ParentRef I send the FullName of the job. I've even tried the ListID, to no avail. Never both as I think this will error, no?

It always returns 'Invalid Parent ID 800022EC-1389805029'. This is the parent's correct ListID as you can see from the output.

My XML is as follows:

Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1" ?><?qbxml version="12.0" ?><QBXML><QBXMLMsgsRq onError="stopOnError"><CustomerModRq><CustomerMod><ListID>800022EC-1389805029</ListID><EditSequence>1389805029</EditSequence><Name>computest</Name><ParentRef><FullName>computest</FullName></ParentRef><CompanyName>Sales Order for John Lewis</CompanyName><Salutation></Salutation><FirstName></FirstName><LastName></LastName><BillAddress><Addr1>sdsd</Addr1><Addr2>sdsd, sdsd</Addr2><City>sssss</City><State>Louisiana</State><PostalCode>1100233</PostalCode><Country>United States</Country></BillAddress><ShipAddress><Addr1>sdsd</Addr1><Addr2>sdsd, sdsd</Addr2><City>sssss</City><State>Louisiana</State><PostalCode>1100233</PostalCode><Country>United States</Country></ShipAddress><Phone></Phone><AltPhone></AltPhone><Fax></Fax><Email></Email><AccountNumber>COMPUTES</AccountNumber><CreditLimit>5000.00</CreditLimit></CustomerMod></CustomerModRq></QBXMLMsgsRq></QBXML>

Have I done something wrong? Probably...any ideas what it is? Thanks!

John
« Last Edit: January 15, 2014, 10:32:39 AM by johnlewisdesign »

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Invalid Parent Specified
« Reply #1 on: January 15, 2014, 11:13:51 AM »
The xml shows circularity--it's naming itself as the ParentRef using the FullName. The Customer is computest, which cannot be its own parent (as shown  here...

<ParentRef><FullName>computest</FullName></ParentRef>

Also: based on your description ("trying to send a job for the first time"), you should be using CustomerAddRq and not CustomerModRq.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852