cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Menu option in Right Click Context Menu

0 Kudos
841

Dear Expert,

I want to add a menu in a particular system form's (say GRPO screen only) right-click context menu.

But how can I check the system form in RightClickEvent? RightClickEvent has a property called "FormUID", but it is not unique (changes every time form open) for a system form.

Regards

Sibasish

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

As an alternative I am checking the active form and its FormType:

private void SboApplication_RightClickEvent(ref ContextMenuInfo eventInfo, out bool BubbleEvent)

        {

            BubbleEvent = true;

            if (eventInfo.BeforeAction)

            {

                SAPbouiCOM.Form oForm = SBO_Application.Forms.ActiveForm;

                if (oForm.TypeEx == "143")     //--GRPO--

                {

                    //---Operation---

Is it the right way?

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Yes this is the right way to do it.

Also there is a sample in SDK Samples for the same. You can try that also:

C:\Program Files (x86)\SAP\SAP Business One SDK\Samples\COM UI\CSharp\22.RightClick

Hope it helps.

Thanks & Regards

Ankit Chauhan

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Also have a look here:

Hope it helps.

Thanks & Regards

Ankit Chauhan

Answers (0)