Skip to Content
0

update GrossBuyPr in RDR1

Mar 28, 2017 at 01:11 PM

37

avatar image
Former Member

Hi experts,

can i update GrossBuyPr from DI api? i am trying to find a way to update the field to get the right GrssProfit. So i can do it directly from sap but it is not updating when i'm doing it from the DI api? do you have any sugestions?

Best regards,

Suierica Bogdan

10 |10000 characters needed characters left characters exceeded

Hi Bogdan,

Please add the SAP Business One SDK tag to your question.

Regards,

Johan

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

ANKIT CHAUHAN
Mar 28, 2017 at 01:57 PM
0

Hi,

Can you try this?

Dim oCreditNote As SAPbobsCOM.Documents 
oCreditNote = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes) 
oCreditNote.DocObjectCode = SAPbobsCOM.BoObjectTypes.oCreditNotes 
oCreditNote.GetByKey(11)
oCreditNote.Lines.SetCurrentLine(0) 
oCreditNote.Lines.GrossBase = -5 
oCreditNote.Lines.GrossBuyPrice = 140
RetVal = oCreditNote.Update() 

If RetVal <> 0 Then 
oCompany.GetLastError(lErrCode, ErrorMSG) 
MessageBox.Show(lErrCode & " " & ErrorMSG)

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Share
10 |10000 characters needed characters left characters exceeded