Knowledgebase
[QODBC-Desktop] Troubleshooting: The Template Type Problem When Creating a Sales Order
Posted by Juliet (QODBC Support) on 04 November 2011 02:53 AM

The Template Type Problem When Creating a Sales Order

Troubleshooting: The Template Type Problem When Creating a Sales Order

Problem Description

Query in VB Demo

Here is a query, its function is to create a sales order line.

INSERT INTO "SalesOrderLine"
("CustomerRefListID", "TemplateRefListID", "SalesOrderLineItemRefListID",
"SalesOrderLineQuantity", "SalesOrderLineRate","FQSaveToCache")
VALUES
('6E0001-1197764528','1C0000-1197748364', '240000-1071531214', 5.00000, 1.00000, 0)

Error in the Result

But when excute in VB Demo, we got an error like this:

Instructions

This error is caused by the template list ID 1C0000-1197748364. So we checked the template type of this list ID and found out that this is an invoice template.

Solution

Then we must use a sales order template to replace it.

Get a Sales Order Template ID

Query in VB Demo

INSERT INTO "SalesOrderLine"
("CustomerRefListID", "TemplateRefListID", "SalesOrderLineItemRefListID",
"SalesOrderLineQuantity", "SalesOrderLineRate","FQSaveToCache")
VALUES
('6E0001-1197764528','110000-1071513693', '240000-1071531214', 5.00000, 1.00000, 0)

This time, the query works fine.

Result

And here is the result.

(42 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).