问题
I want to insert an Invoice into Exact Online. When I insert the invoice manual, it works fine, but with the Invantive Control tool I get an error:
insert into UploadXMLTopics
( topic
, payload
, division_code
, orig_system_reference
, orig_system_group
)
select 'Invoices'
, '<?xml version="1.0" encoding="utf-8"?>'
|| '<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd">'
|| ' <Invoices>'
|| ' <Invoice>'
|| ' <Journal code="70"/>'
|| ' <Description>Test invoice</Description>'
|| ' <YourRef>Your name</YourRef>'
|| ' <Notes>Test note</Notes>'
|| ' <OrderedBy ID="{c3b73aa4-c5c1-49bc-8a76-2802a26c5973}" code="289" />'
|| ' <DeliverTo ID="{c3b73aa4-c5c1-49bc-8a76-2802a26c5973}" code="289" />'
|| ' <InvoiceTo ID="{c3b73aa4-c5c1-49bc-8a76-2802a26c5973}" code="289" />'
|| ' <PaymentCondition code="30" />'
|| ' <SalesPerson id="{92e96458-82ba-4a1f-a056-61bda3b42f04}" />'
|| ' <InvoiceLine line="1">'
|| ' <Description>Article name</Description>'
|| ' <Item code="0003" />'
|| ' <Quantity>2</Quantity>'
|| ' <Note><![CDATA[THIS IS A NOTEDIT IS EEN NOTITIE]]></Note>'
|| ' </InvoiceLine>'
|| ' </Invoice>'
|| ' </Invoices>'
|| '</eExact>'
, 123456,
, 'Create-invoice-1'
, 'Create-invoice'
from me
The error I get:
[12292] Total execution time: 562 ms at level 0: 'Run SQL action insert into UploadXMLTopics ( topic , payload , division_code , orig_system_reference , orig_system_group ) select 'Invoices', '<?xml version="1.0" encoding="utf-8"?>' || '<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd">' || ' <Invoices>' || ' <Invoice>' || ' <Journal code="70"/>' || ' <Description>Test invoice</Description>' || ' <YourRef>Your name</YourRef>' || ' <Notes>Test note</Notes>' || ' <OrderedBy ID="{c3b73aa4-c5c1-49bc-8a76-2802a26c5973}" code="289" />' || ' <DeliverTo ID="{c3b73aa4-c5c1-49bc-8a76-2802a26c5973}" code="289" />' || ' <InvoiceTo ID="{c3b73aa4-c5c1-49bc-8a76-2802a26c5973}" code="289" />' || ' <PaymentCondition code="30" />' || ' <SalesPerson id="{92e96458-82ba-4a1f-a056-61bda3b42f04}" />' || ' <InvoiceLine line="1">' || ' <Description>Article name</Description>' || ' <Item code="0003" />' || ' <Quantity>2</Quantity>' || ' <Note><![CDATA[THIS IS A NOTE]]></Note>' || ' </InvoiceLine>' || ' </Invoice>' || ' </Invoices>' || '</eExact>', 123456, 'Create-invoice-1', 'Create-invoice' from me '.
[12292] Saving 175 SQL History items to 'C:\Users\fleemkuil\Invantive\Prd\Invantive Query Tool\sqlhistory.xml'.
回答1:
The error you list actually isn't an error. It is just some logging the framework does.
You have to check the UploadXMLTopics
table to see if the execution was successful or not.
For example:
select successful
, result
, result_errors
from UploadXMLTopics
where orig_system_reference = 'Create-invoice-1'
Make sure to check the result
and result_errors
columns to see what caused an upload to fail.
来源:https://stackoverflow.com/questions/42955321/insert-invoice-into-exact-online