cancel
Showing results for 
Search instead for 
Did you mean: 

How to get UDO form reference?

0 Kudos

Dear experts,
I develope Addon using SAPBusinessOneSDK ("new" framework 9).
On menu event I need to call method on my active MyUDOform.
How to get reference to my MyUDOform?
When I get Application.SBO_Application.Forms.ActiveForm (SAPbouiCOM.Form) I can not cast it to MyUFOform (inherit from SAPbouiCOM.Framework.UDOFormBase).

if (pVal.BeforeAction == false && pVal.MenuUID == "1281")
....
MyUDOform mf;
mf = (MyUDOform)Application.SBO_Application.Forms.ActiveForm;
mf.callSomething();

There is convert exception between COM and not COM object.
How to resolve this problem?

best regards Michal

Accepted Solutions (0)

Answers (0)