Please concentrate on the error. I can not post the entire lengthy code. The variable intSeries in assigned some value and that part of code is not posted. The above code was running perfectly. Please concentrate only on this part.
lngStatus = objPO.Add
The variable lngStatus returns value -10. When I viewed error using objCompany.GetLastErrorDescription it gave error as ,
10001385 - Enter valid number; document number already exists
When is -10 value returned ? When is the following error received ,
10001385 - Enter valid number; document number already exists