on 09-23-2008 1:24 PM
I am trying to add employee data using the EmployeesInfo object with the following C# code and I get a return code of 1 with the message "Internal error (1) occurred". We are running 2007A (8.00.177) SP:00 PL:39.
EmployeesInfo oEmpInfo = ((EmployeesInfo)(B1Connections.diCompany.GetBusinessObject(BoObjectTypes.oEmployeesInfo)));
oEmpInfo.FirstName = "John";
oEmpInfo.MiddleName = "Jacob";
oEmpInfo.LastName = "Johnson";
oEmpInfo.IdNumber = "111-22-3333";
iRet = oEmpInfo.Add();
if (iRet != 0)
{
B1Connections.diCompany.GetLastError(out iRet, out sFld);
}
Hi Tim,
I ran your code and it worked for me, so it seems there's nothing wrong on that side.
Seems it must be either related to the environment or database.
1. Can you add the employee info in the application?
2. Can you try running the add-on from another workstation?
3. Try refreshing the DI API:
- Locate the Temp folder by going to Start -> Run and type %temp%
- Locate the SM_OBS_DLL folder here and delete it.
- Uninstall the DI API from Add/Remove Programs.
- Reboot your PC
- Install the DI API from your current patch.
If you still have no joy, I'd suggest running the Common Upgrader from your latest patch again to ensure the SBO-COMMON isn't the source of the issue. You will lose no data.
Hope it's useful,
Regards,
Niall
SAP Business One Forums
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.