Skip to Content
avatar image
Former Member

Link documents to service call - Now related to record found

Hi, I have written some code that links sales documents to service calls. However, in many cases I get the error:

10000677 - No related record found

below is my code:

Can somebody please help?

SAPbobsCOM.ServiceCalls oService = (SAPbobsCOM.ServiceCalls)globals.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oServiceCalls);

if (oService.Expenses.DocEntry != 0)                        
    {
      oService.Expenses.Add();
    }
 oService.Expenses.DocEntry = int.Parse(docNum);

oService.Expenses.DocumentType = SAPbobsCOM.BoSvcEpxDocTypes.edt_Delivery;
                            
if (oService.Update() != 0)
{
globals.SBO_Application.MessageBox(globals.oCompany.GetLastErrorDescription(), 1, "OK", "", "");
}
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers