Skip to Content
avatar image
Former Member

Append option to right click UI API

Hello everyone,

I want to append an option to right click menu when a user right clicks on Tel1 field's value in SAP Business One using UI API. I have read sample no.22 of SDK Samples but was not very helpfull. Language that I use is C# but even a suggestion in VB would be much appreciated.

Kind Regards,

Dimitris

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 01, 2017 at 07:35 AM

    Hi Dmitris,

    Regarding the created form, that is just because they needed one to show how to do it. You can add new menu options to an existing form.

    Regarding the RightClick event, yes you'll have to use that event to add and remove your options.

    About the Menu class, it depends whether you're trying to add a completely new menu (using Form.Menu) or enabling an existing but disabled menu (Form.EnableMenu(menuId, true/false)).

    Give it a try and if you run into trouble let us known and we will help you.

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Pedro,

      thanks again for your help. I think I got it now and have some working results. I use item event to get current's Business Partner's form UID, right click event to add my option to right click menu that appears and menu event so that my option will execute a method.

      Kind Regards,

      Dimitris

  • Jan 31, 2017 at 03:22 PM

    Hi Dmitris,

    The easiest way is to capture the before right-click event and add your option.

    Then remove it in the after right-click event.

    The Sample you've seen is actually the right one for that. Did you have a specific thing that you didn't understand?

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Pedro,

      thanks for your quick response.

      Firstly I noticed in SDK sample a new form is created and is used on right click event. I don't want that, I just want to append one more option on the existing form.

      Secondly do I have to use Menu, Item, Right_Click Events or just Right Click Event will do the job?

      Kind Regards,

      Dimitris