Hi,
I'm trying to create an application that automatically creates a quotation (reading data from different sources), but I've some problems.
I serached for this issue in the forum, but I don't find a solution... so I'm trying to ask you...
I use the code found in the SDK to create a quotation, but in C#:
Documents quotation = (Documents)compagnia.GetBusinessObject(BoObjectTypes.oQuotations);
// Set values to the business object fields
quotation.Series = 0;
quotation.CardCode = "C001";
quotation.HandWritten = BoYesNoEnum.tNO;
quotation.PaymentGroupCode = -1;
quotation.DocDate = DateTime.Now;
quotation.DocTotal = 50 ;
// Set values to the business object line fields
quotation.Lines.ItemCode = "0017";
quotation.Lines.ItemDescription = "name";
quotation.Lines.PriceAfterVAT = 1;
quotation.Lines.Quantity = 50;
quotation.Lines.Currency = "Eur";
quotation.Lines.DiscountPercent = 0;
// Add the quotation
quotation.Add();
But the error is -2028: No matching records found (ODBC 2028).
So I tried to use an Items object, getting its values by key (by items.GetByKey) and passing them to the document line... but with the same result...
Have you some idea, solution or opinion about this problem?
Thank you for the attenction...
PierpaoloC