Codeunits on the NAV panel

Demonic240Demonic240 Member Posts: 65
Is there a way for me to test the caption value of a codeunit within itself when run? What I'm trying to do is make one code unit that has a list of websites and hyperlinks and put it at different places on the NAV menu. I want to use different captions to determine which hyperlink is to be run so that i don't have to waste a bunch of codeunits.

Comments

  • ara3nara3n Member Posts: 9,256
    Can't be done.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Demonic240Demonic240 Member Posts: 65
    Thanks. I actually found a way to create shortcuts in the Menu Panel which link to websites. It's exactly what I need.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    A way around is to create a report that runs these codeunits.
  • WaldoWaldo Member Posts: 3,412
    Demonic240 wrote:
    Thanks. I actually found a way to create shortcuts in the Menu Panel which link to websites. It's exactly what I need.

    Can you share this idea?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • MTCMTC Member Posts: 159
    ara3n wrote:
    Can't be done.

    What he's trying to do there can be done indirectly, but it involves some messing and isn't worth it in a case such as this.
  • ara3nara3n Member Posts: 9,256
    in shortcut, you right click and select create shortcut.
    In open box you type www.google.com. In caption you type google
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • MTCMTC Member Posts: 159
    Waldo wrote:
    Demonic240 wrote:
    Thanks. I actually found a way to create shortcuts in the Menu Panel which link to websites. It's exactly what I need.

    Can you share this idea?

    I would guess that he's refering to the old ShortcutURL property trick. Although the Menu Suite designer doesn't allow you to create them, it does allow you to edit them if they are there. You have to add them by exporting the menu suite as a text file, adding the property there, and then editing it in the Menu Suite designer. I've used this trick many times before.

    http://dynamicsuser.net/forums/p/12771/61728.aspx#61728
  • ara3nara3n Member Posts: 9,256
    That's a great trick to handle forms with different filters.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • WaldoWaldo Member Posts: 3,412
    ara3n wrote:
    in shortcut, you right click and select create shortcut.
    In open box you type www.google.com. In caption you type google

    I hope you mean Live Search?
    :mrgreen:

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Demonic240Demonic240 Member Posts: 65
    MTC wrote:
    Waldo wrote:
    Demonic240 wrote:
    Thanks. I actually found a way to create shortcuts in the Menu Panel which link to websites. It's exactly what I need.

    Can you share this idea?

    I would guess that he's refering to the old ShortcutURL property trick. Although the Menu Suite designer doesn't allow you to create them, it does allow you to edit them if they are there. You have to add them by exporting the menu suite as a text file, adding the property there, and then editing it in the Menu Suite designer. I've used this trick many times before.

    http://dynamicsuser.net/forums/p/12771/61728.aspx#61728

    That's exactly what i did. I just modified it a little bit to work for me and it works great.

    To ara3m: Yes you can add them directly to the shortcut Tab but you can't copy them over to the other tabs for all users to see. You have to export it as a text file and find the last item on the tab. My code looks like this:
    { MenuShortcut   ;[{F75D585D-0200-4CBA-AA93-8D0FDDBB42FC}] ;Name=Google;
    								CaptionML=PLK=Google;
    								MemberOfMenu=[{09D0CC08-3690-4E5B-A869-D891F3AF061F}];
    								ParentNodeID=[{09D0CC08-3690-4E5B-A869-D891F3AF061F}];
    								ShortcutURL=Http://www.Google.com;
                                                                    Visible=Yes; 
    								NextNodeID=[{00000000-0000-0000-0000-000000000000}] }
    

    Once you get that in the text file you can import it back, compile it, and then you are free to copy the shortcuts to any other tab on the NAV panel.
    *Note: The shortcut doesn't work initially, you have to edit it to make it work.
  • MTCMTC Member Posts: 159
    ara3n wrote:
    That's a great trick to handle forms with different filters.

    Yes, it's what I have mainly used it for before.
Sign In or Register to comment.