cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Error

Former Member
0 Kudos

Hi All,

I got an error during data access..

So what should i have do...

Plz help...

Regards

Vikas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vikas,

When an error occurs in SAP Business One during data access, you can call the Company object method GetLastError (errCode as Long, errMsg as String) to get the return code and error description.

You must call the method as soon as the error occurs. Once you have called subsequent methods, the error information is lost.

If no errors occur, errCode contains the value 0 and errMsg is an empty string. Otherwise, errCode contains a value other than 0 and errMsg contains the error description (see Error Codes List).

Methods or properties that do not return a result value also can be monitored. If a method or a property results with a failure, the object throws an exception, which indicates the error code.

Regard

Yogesh

Answers (0)