I am getting an error when I open a SAP B1 form a second time, error is not thrown when I open the form the first time after running the addon.
Error message:
SAP B1 Error: (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT
This is a b1f form built through Visual Studio.
The error gets thrown here:
if (pVal.FormTypeEx == "ContinuousProduction.LaminationSFGReceipt" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_VISIBLE && pVal.BeforeAction == false)
{
if (EditText3.Value == string.Empty) <-- Error gets thrown here
{
Button3.Item.Visible = false;
}
else
{
Button3.Item.Visible = true;
}
}
What can I do to resolve this issue?

Even though your error comes from the server, check first if some safeguard checks in your client code would be enough:
You might at least capture the error on the client side.