I am getting the contactpersoncode from the saleorder using
ContactPersonCode = salesorder.ContactPersonCode
this is a text number '31'
but as there is onle one contact person on the bus Partner record I get an exeption when using
oBpEmp = oBP.ContactEmployees oBpEmp.SetCurrentLine(CInt(ContactPersonCode) - 1)
Am I using this code correctly? any pointers?