cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot reference Return on Credit Memo DI API

nalamo
Participant
0 Kudos

I am trying to copy a Return (SO) to an AR Credit Memo (CreditNotes), but, I am getting the following message. Clearly, in B1, you can copy a Return to a CM and it will have reference to the Return. Am I missing something?

You cannot use this type of document as a base document [RDN1.BaseType][line: 1]

Here is the code for the CM lines

cDoc.Lines.ItemCode = Convert.ToString(sdr2.Fields.Item("ItemCode").Value);
cDoc.Lines.Quantity = Convert.ToDouble(sdr2.Fields.Item("Quantity").Value);
cDoc.Lines.ShipDate = oDoc.DocDueDate;
cDoc.Lines.BaseEntry = oDoc.DocEntry;
cDoc.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oReturns);
oDoc.Lines.BaseLine = Convert.ToInt32(sdr2.Fields.Item("LineNum").Value);

Accepted Solutions (0)

Answers (1)

Answers (1)

alanm1
Explorer
0 Kudos

Was using wrong object. Solved.