There is an invalid reference to QuickBooks Customer "ABS, JLMN" in the Invoice. QuickBooks error message: Invalid argument. The specified record does not exist in the list.
<InvoiceAddRq requestID = "***">
<InvoiceAdd>
<CustomerRef>
<FullName>ABS, JLMN</FullName>
</CustomerRef>
<TxnDate>2014-10-31</TxnDate>
<TermsRef>
<FullName>*Proper existing term*</FullName>
</TermsRef>
<DueDate>2014-11-30</DueDate>
<InvoiceLineAdd>
<ItemRef>
<FullName>*Proper existing term*</FullName>
</ItemRef>
<Desc>*String Value*</Desc>
<Rate>0.00</Rate>
</InvoiceLineAdd>
<InvoiceLineAdd>
<ItemRef>
<FullName>*Proper existing term*</FullName>
</ItemRef>
<Desc>*Strings of text*</Desc>
<Rate>0.00</Rate>
</InvoiceLineAdd>
<InvoiceLineAdd>
<ItemRef>
<FullName>*Proper existing term*</FullName>
</ItemRef>
<Desc>*Strings of text*</Desc>
<Rate>0.00</Rate>
</InvoiceLineAdd>
<InvoiceLineAdd>
<ItemRef>
<FullName>*Proper existing term*</FullName>
</ItemRef>
<Desc>*Strings of text*</Desc>
<Rate>0.00</Rate>
</InvoiceLineAdd>
</InvoiceAdd>
<IncludeRetElement>TxnID</IncludeRetElement>
<IncludeRetElement>CustomerRef</IncludeRetElement>
<IncludeRetElement>ItemRef</IncludeRetElement>
</InvoiceAddRq>
Please note that the values mentioned in "*"s are only place holders.
The customer ABS, JLMN is present in Quick books but still I get this error. This is not the only request while generating the request XML, there are other customers also with same properties. I am not getting any error for those customers. Can any one please let me know what can be the problem here?
Is there any chance that my company file is corrupted? I am doing many InvoiceADD and CustomerADD requests with the company file as a part of my requirements. So could that be a reason for the problem here?
Please let me know if you need any more information.
Thanks.
There is an invalid reference to **QuickBooks** Customer "ABS, JLMN" in the Invoice.
This error Occurs when Customer "ABS, JLMN" does not exists in the Quickbooks and you try to add invoice against that customer.
If customer already exists in Quickbooks then parse the name of customer in your requestXML. Special characters also create errors.
Related
I am creating a Web API for a local network in the .net framework(C#). In that user can import/export IO Tags from excel or set them as a static string array. I have added (Siemens.Engineering.Hmi.dll) but still, it shows a not found compile-time error.
We have also connected to TIAPortal and it works well the only roadblocks are I/O tags import/export or set static values and HMISoftware.
Project: Web API(.Net Framework 4.6.1)
Tia Portal: v16.0
License Type: Trial
Kindly revert me if anyone have idea or any suggestion. It would be highly appriciated.
The issue you are experiencing is that (most probably) you didn't set the copy local property of the referenced Siemens.Engineering.Hmi.dll to false. So, the dependencies of the referenced Siemens.Engineering.Hmi.dll cannot be found. As a remark: add the Siemens.Engineering.dll as a reference besides Siemens.Engineering.Hmi.dll
Having a not-local-assembly then requires AssemblyResolving. The simplest way of doing it is to use the App.config file.
Please see this page from Siemens about this topic:
support.industry.siemens.com
The second issue I see is the access of Tags. As you most certainly know, there are HMI Tags and PLC Tags. Accessing them is possible through the respective DeviceItems. These DeviceItems expose different Services. You can access the Services through the <YourEngineeringObject>.GetService<T>() method. In this case you will need the SoftwareContainer service.
To become familiar with the data model of TIA Openness, please have a look at the TIA Openness Explorer
Also, to deepen your understanding of working with TIA Openness, please refer to SIMATIC TIA Portal Openness: API for automation of engineering workflows
The solution I'm importing IO tags is to use .xml files
Its advantage is that it can access and set the properties of IO tags, such as IO tagstable's name, datatypename, externalaccessible, externalvisible, externalwritable, logicaladdress, tagName, comment.
For Example .xml
<?xml version="1.0" encoding="utf-8"?>
<Document>
<Engineering version="V16" />
<SW.Tags.PlcTagTable ID="0">
<AttributeList>
<Name>IO Table</Name>
</AttributeList>
<ObjectList>
<SW.Tags.PlcTag ID="1" CompositionName="Tags">
<AttributeList>
<DataTypeName>Bool</DataTypeName>
<ExternalAccessible>true</ExternalAccessible>
<ExternalVisible>true</ExternalVisible>
<ExternalWritable>true</ExternalWritable>
<LogicalAddress>%I0.0</LogicalAddress>
<Name>Tag</Name>
</AttributeList>
<ObjectList>
<MultilingualText ID="2" CompositionName="Comment">
<ObjectList>
<MultilingualTextItem ID="3" CompositionName="Items">
<AttributeList>
<Culture>en-US</Culture>
<Text>Tag</Text>
</AttributeList>
</MultilingualTextItem>
</ObjectList>
</MultilingualText>
</ObjectList>
</SW.Tags.PlcTag>
</ObjectList>
</SW.Tags.PlcTagTable>
</Document>
You only need to modify the tags attribute in. XML, including the ID value. For example, first tag ID = 1, and the second tag ID = 2.ID's value is not repeatable!
For Example .cs
var fileInfo = new FileInfo(#"IO MAP.xml");
SoftwareContainer softwareContainer = Project.Devices[0].DeviceItems[1].GetService<SoftwareContainer>();
Software softwareBase = softwareContainer.Software;
PlcSoftware plcSoftware = softwareBase as PlcSoftware;
PlcTagTableGroup PlcTagTableGroup = plcSoftware.TagTableGroup;
PlcTagTableGroup.TagTables.Import(fileInfo, ImportOptions.Override);
You only need to modify the target of SoftwareContainer , which depends on the PLC model you use, in the case of s7-1516.
If you have any questions, please contact me。
I am using QBFC to add invoices and bills to QB from my C# app. I have it successfully creating invoices, but I am having trouble creating bills.
I have updated this question to remove most of the code. I have been removing pieces of the message to determine the issue and it turns out I am getting the error from the VendorAddress attribute. The attribute comes up in intellisense, but generates the error when sent to QuickBooks. Is there no way to override the vendor address?
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="6.0"?>
<QBXML>
<QBXMLMsgsRq onError = "continueOnError">
<BillAddRq requestID = "0">
<BillAdd>
<VendorRef>
<FullName>SENECA</FullName>
</VendorRef>
<VendorAddress>
<Addr1>SENECA SAWMILL CO.</Addr1>
<Addr2>UNIT 136</Addr2>
<Addr3>PO BOX 5037</Addr3>
<Addr4/>
<City>PORTLAND</City>
<State>OR</State>
<PostalCode>97208-5037</PostalCode>
<Country>US</Country>
</VendorAddress>
<TxnDate>2018-07-12</TxnDate>
<DueDate>2018-07-22</DueDate>
<RefNumber>12345</RefNumber>
<TermsRef>
<FullName>1.0% 20 DAYS</FullName>
</TermsRef>
<ItemLineAdd>
<ItemRef>
<FullName>1248SK</FullName>
</ItemRef>
<Desc>94080 BF # $410 per MBF
STUD GRADE FIR S4S ALS KD GM 2x4x8</Desc>
<Quantity>17640</Quantity>
<Cost>2.1867</Cost>
<Amount>38572.86</Amount>
</ItemLineAdd>
<ItemLineAdd>
<ItemRef>
<FullName>124PCSK</FullName>
</ItemRef>
<Desc>18816 BF # $400 per MBF
STUD GRADE FIR S4S ALS KD GM 2x4x7' 8 5/8</Desc>
<Quantity>3528</Quantity>
<Cost>2.1333</Cost>
<Amount>7526.39</Amount>
</ItemLineAdd>
</BillAdd>
</BillAddRq>
</QBXMLMsgsRq>
</QBXML>
The QuickBooks desktop API is versioned, and the versioning is controlled by this line in your example:
<?qbxml version="6.0"?>
You're using version 6.0 of qbXML, and if you refer to the QuickBooks OSR:
https://static.developer.intuit.com/qbSDK-current/common/newosr/index.html
You'll see that the VendorAddress component isn't supported until 13.0:
You need to either not include this tag, or change the qbXML version you're using (or potentially do both, if you want to cater to QuickBooks versions that support this qbXML version AND QuickBooks versions that do not support this qbXML version).
try changing the version number and try again. Let's see if your Quickbook APP desktop version is compatible to it or not.
Example :
<?qbxml version="13.0"?>
If you're using QBFC, then you can specify the version when creating the message set request
IMsgSetRequest rqMsgSet = qbSsnMgr.CreateMsgSetRequest("US", 13, 0);
Please help:
I did add and edit functionality in QuickBooks through QuickBooks SDK using my windows application (C#).
Now, I want to know, how to do delete operation in QuickBooks using QuickBooks SDK?
This is my XML Request:
<?xml version="1.0"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<EmployeeModRq requestID="1">
<EmployeeMod>
<ListID>800002A0-1477976825</ListID>
<EditSequence>1477977063</EditSequence>
<IsActive>False</IsActive>
<FirstName>Bobby</FirstName>
<MiddleName></MiddleName>
<LastName>Westbrooks(111-11-1111)</LastName>
<EmployeeAddress>
<Addr1>4205 Coleman</Addr1>
<City>Memphis</City>
<PostalCode>38128</PostalCode>
</EmployeeAddress>
<SSN>111-11-1111</SSN>
<Email>bgwestbrooks#brmch.com</Email>
<EmergencyContacts>
<PrimaryContact>
<ContactName>Rhonda Westbrooks</ContactName>
<ContactValue>0</ContactValue>
</PrimaryContact>
</EmergencyContacts>
<HiredDate>2015-11-11</HiredDate>
<ReleasedDate>2015-11-11</ReleasedDate>
<BirthDate>2015-11-11</BirthDate>
</EmployeeMod>
</EmployeeModRq>
</QBXMLMsgsRq>
</QBXML>
</xml>
You can use the ListDel request to delete employees (and other List type objects like customers, vendors, etc).
From the OSR:
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
ListDel - Delete a list object
ou can only delete a list item from a QuickBooks company file if the
file is open in single-user mode. If the file is open in multiuser
mode, your application will receive an error. (This restriction does
not apply to deleting or voiding transaction objects.)
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ListDelRq>
<!-- ListDelType may have one of the following values: Account, BillingRate, Class, Currency, Customer, CustomerMsg, CustomerType, DateDrivenTerms, Employee, InventorySite, ItemDiscount, ItemFixedAsset, ItemGroup, ItemInventory, ItemInventoryAssembly, ItemNonInventory, ItemOtherCharge, ItemPayment, ItemSalesTax, ItemSalesTaxGroup, ItemService, ItemSubtotal, JobType, OtherName, PaymentMethod, PayrollItemNonWage, PayrollItemWage, PriceLevel, SalesRep, SalesTaxCode, ShipMethod, StandardTerms, ToDo, UnitOfMeasureSet, Vehicle, Vendor, VendorType, WorkersCompCode -->
<ListDelType >ENUMTYPE</ListDelType> <!-- required -->
<ListID >IDTYPE</ListID> <!-- required -->
</ListDelRq>
</QBXMLMsgsRq>
</QBXML>
This is my QBXML request
<?xml version="1.0" ?>
<?qbxml version="6.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<InvoiceModRq requestID="1">
<InvoiceMod>
<TxnID>85-1442639879</TxnID>
<EditSequence>1442639879</EditSequence>
<CustomerRef>
<ListID>80000005-1442639850</ListID>
<FullName>Bruce Banner</FullName>
</CustomerRef>
<TxnDate>2015-09-19</TxnDate>
<RefNumber>5462</RefNumber>
<InvoiceLineMod>
<ItemRef>
<ListID>8000000A-1442469770</ListID>
<FullName>Item 1</FullName>
</ItemRef>
<Quantity>1</Quantity>
<Rate>1100.00</Rate>
</InvoiceLineMod>
</InvoiceMod>
</InvoiceModRq>
</QBXMLMsgsRq>
</QBXML>
I am getting an error
QuickBooks found an error when parsing the provided XML text stream.
please help
If you refer to the QuickBooks OSR:
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
You'll notice that within the <InvoiceLineMod> element, this node is required:
<TxnLineID>
The OSR gives you a bit more information too:
TxnLineID
Identification number of the transaction line. (TxnLineID
is supported as of v2.0 of the SDK. With qbXML v1.0 and v1.1,
TxnLineID is always returned as zero.)
If you need to add a new transaction line in a transaction Mod
request, you can do so by setting the TxnLineID to -1.
So, you'll need to add in a <TxnLineID> node. If it's a new line item, put -1 for the content within the node. If it's an existing line you're trying to update, put the TxnLineID value of the existing line in there.
Example:
...
<InvoiceLineMod>
<TxnLineID>-1</TxnLineID>
<ItemRef>
<ListID>8000000A-1442469770</ListID>
<FullName>Item 1</FullName>
</ItemRef>
<Quantity>1</Quantity>
<Rate>1100.00</Rate>
</InvoiceLineMod>
...
I am trying to add an Invoice with above specified XMl but getting 6070 Error Code.Amount is not equal to Qty * UnitPrice.Is there a way to ignore this error.
Here is my Add invoice request in Xml format.
<Invoice xmlns="http://schema.intuit.com/finance/v3">
<DocNumber> aa444</DocNumber>
<TxnDate>2013-08-06</TxnDate>
<Line>
<Amount>20.00</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="HomecareServices">5</ItemRef>
<UnitPrice>20</UnitPrice>
<Qty>2</Qty>
<TaxCodeRef>NON</TaxCodeRef>
<ServiceDate>2013-08-01</ServiceDate>
</SalesItemLineDetail>
</Line>
<CustomerRef name="ABCD">10</CustomerRef>
<BillAddr>
<Line1>ABCD- 10</Line1>
</BillAddr>
<DueDate>2013-08-10</DueDate>
<TotalAmt>20.00</TotalAmt>
</Invoice>
SalesItemLineDetail is wrong, should be InvoiceItemLineDetail