Sales employee in A/R invoice
I am entering A/R invoices using DI/API.I am using the following code -
objDoc = objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices) objDoc.DocObjectCode = SAPbobsCOM.BoObjectTypes.oInvoices objDoc.CardCode = objDTHeader.Rows(intI).Item("CardCode") objDoc.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO objDoc.DocDate = objDTHeader.Rows(intI).Item("DocDate")
I want to set Sales Employee as -No SE - .I tried the code
objDoc.SalesPersonCode = -1
But any random sales person is getting set.The code for setting owner is working properly bu the code for setting sales employee is not working.