Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Internal error (1) occurred when adding EmployeesInfo thru DI API

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);
                    }

Former Member
replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question