cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error While Trying to take Control of Query Manager Matrix in Addon using C# in SAP B1

0 Kudos
231

I need to find and open my addon screen by double clicking the docEntry column in query manager. But I could not take the control of the matrix using SAPbouiCOM.Matrix OMatrix=frmQuerymanage.Items.Item("7").Specific I got an error as
"Click Event Failed: Unable to cast COM object of type 'System._ComObject' to interface type 'SAPbouiCOM.Matrix'. This operation failed because the Query Interface call on the COM component for the interface with IID '[85689291-F296-4A2E-8EB8-FF9189E23425}' " Same happens when I tried for Grid.
Kindly Suggest a Solution 

Accepted Solutions (0)

Answers (1)

Answers (1)

inga_babco2
Participant
0 Kudos

try this:

SAPbouiCOM.Matrix OMatrix= (SAPbouiCOM.Matrix)frmQuerymanage.Items.Item("7").Specific;