We want to be able to have users create multiple order lines from a quote by specifying the quote lines.
I am implementing the backend part of it in functions using REST calls on Erp.BO.SalesOrderSvc.
Looking at debug tools and tracing when doing one thru the UI shows the following are required and have been implemented in my function (code snippet further below):
Create new SalesOrder tableset
SalesOrderSvc.OrderDtlGetNewFromQuote(orderNum, ref orderTS)
order dataset is returned with a new line
SalesOrderSvc.OrderDtlQuoteLineChanging(quoteNum, quoteLine, ref orderTS)
updates the order line in the dataset with the quote line data
SalesOrderSvc.GetQuoteQty(quoteNum, quoteLine)
returnObj is the quantity data for the order release
First service call works fine, but OrderDtlQuoteLineChanging throws exception “Invalid Quote Line”, there is no inner exception.
I do not get an error when I use the same order/quote combination in Epicor UI.
Here is the relevant code:
// need an OrderHed tableset for GetNewOrderDtlFromQuote
Erp.Tablesets.SalesOrderTableset orderTS = new Erp.Tablesets.SalesOrderTableset();
this.CallService<Erp.Contracts.SalesOrderSvcContract>( orderSvc =>
{
orderSvc.OrderDtlGetNewFromQuote(ref orderTS, iOrderNum);
orderSvc.OrderDtlQuoteLineChanging(iQuoteNum, iQuoteLine, ref orderTS);
bool morePages = false;
orderSvc.GetQuoteQty(iQuoteNum, iQuoteLine, 500, 0, out morePages);
});
I am implementing this for Kinetic-Web, how do I select lines when pushing from quote ? (I’m missing something in the UI likely) if that’s true that would be great
From the Quote you want to turn into a Sales Order, in the overflow menu there is Create Sales Order. Select that and you will get a slide out. There is an Order Worthy column that you use to selecte the lines you want on the SO.
Very odd, on a 3 line order I selected line 1 and 3.
The resulting order had line 1 correct but for order line 2 it took the unit price from line quote line 2 and the qty from quote line 3
I’ll have to talk to my project manager, but another reason to use pull instead of push would be if I have an existing order and want to add lines to it
So anyway…I’m back to my original issue, because they want this feature because we often do projects that last a while, and want to be able to add multiple lines from a quote to an existing order