cancel
Showing results for 
Search instead for 
Did you mean: 

GetByKey raises COMException, RPC_E_SERVERFAULT

rajesh_khater
Active Participant
0 Kudos

I am getting the following COMException in GetByKey():

System.Runtime.InteropServices.COMException: 'The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))'

I have verified that the SAPbobsCOM dll is of the same version as the SAP B1 client.Following is my code:
SAPbobsCOM.Documents arInvoice = null;  <br>bool isDocFetched = false;<br>arInvoice = oCompany.GetBusinessObject(BoObjectTypes.oInvoices);<br>//here I am using a DocEntry which exists in the database<br>docFetched = arInvoice.GetByKey(1);
How should I debug it and fix it?

The SAP B1 version is 10.0 FP 2202 (technical version 10.00.190)

Accepted Solutions (1)

Accepted Solutions (1)

rajesh_khater
Active Participant
0 Kudos

As soon as I posted the question, I could see a similar question, which I did not find earlier when I searched before posting the question.

I followed the steps as suggested in the other question and the issue got resolved.

I followed these steps:

1. Deleted the folder SM_OBS_DLL under the TEMP directory, and in fact, deleted everything in the %TEMP% folder that Windows allowed to delete.

2. Closed and restarted the SBO application.

If you find this answer useful, please upvote. Thanks.

Answers (2)

Answers (2)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi rajesh.khater,

The error RPC_E_SERVERFAULT occurs because of OBServer connection recycling.

In Feature Package 2202, there is a possibility to increase the idle time out and stop cleaning up of connection.

Refer to SAP Note: 3200647 for the same.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

rajesh_khater
Active Participant
mk1909_sap
Active Participant
0 Kudos

i was also facing the same issue. kindly check whether this solution works for you or not

https://www.linkedin.com/feed/update/urn:li:activity:7166391771059482624