Skip to Content
0
Former Member
May 08, 2008 at 07:45 PM

Sales order Text Line (Type) Add

838 Views

Hi,

I look into

..\Program Files\SAP\SAP Business One SDK\Samples\COM DI\CSharp\19.SpecialLines

But it Update SpecialLines into existing order.

I am building Order Line and SpecialLines, Order Line and SpecialLines, etc.

So I used Add instead of update, without success.

I write my Order Line = OK, then not OK

oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "My Text Here" ;
oDocument_SalesOrder.SpecialLines.Add();

In SDK Help Center

oDocument_SalesOrder.SpecialLines.Add();
oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "No Text here...Hello?? ";

I manage to add SpecialLines after I had created my Sales Order:

oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "Hello 2";
oDocument_SalesOrder.SpecialLines.AfterLineNumber = 0;
resultMessage = oDocument_SalesOrderP3.Update();
if ( resultMessage != 0 ) // Check the result
{
oCompany.GetLastError(out resultMessage, out ErrMsg);
}

But I did not manage to add more then 1 SpecialLines:

I tried to Add, Update, change AfterLineNumber, etc without success.

I need Help Here...

(David, where are you? don't tell me yo open the bottle you bought...:)

Thank you,

Rune

Edited by: Rune Brattas on May 8, 2008 5:01 PM