Options

Hyperlink to open form in MenuSuite

AlishaAlisha Member Posts: 217
Hi,

I'm trying to user an hyperlink to open a form in the MenuSuite, this is the txt I've imported:

OBJECT MenuSuite 90 Company
{
OBJECT-PROPERTIES
{
Date=06/07/07;
Time=12:27:58;
Modified=Yes;
Version List=;
}
PROPERTIES
{
}
MENUNODES
{
{ ;[{D4407D08-C780-43D3-AA50-A065110A1332}] ;NextNodeID=[{EE8B64EB-8009-43AC-A0C5-96CE114143C5}] }
{ MenuItem ;[{EE8B64EB-8009-43AC-A0C5-96CE114143C5}] ;Name=My Sales Order;
CaptionML=ENG=My Sales Order;
MemberOfMenu=[{2DC8C4FE-7346-4124-8C20-383346384C03}];
ShortcutURL=navision:/ /client/run?target=Form%42;
ParentNodeID=[{0DD141CC-3311-4CB7-BE8C-9E20E331DF60}];
Visible=Yes}
}
}


The problem is that when I import this object, compile it and try to run the MenuSuite, the database crashes and can't be opened again.

Anyone knows why this is happening?

Thanks!

Comments

  • Options
    ArhontisArhontis Member Posts: 667
    Since the menusuite uses IDs to get the menu that the item belongs and the parent, I suppose that your menu structure is not like the one the txt demands (IDs missing).

    Since the txt states that the link is just to open form 42, then why don't you create it by hand (by designing the menusuite)?
  • Options
    MTCMTC Member Posts: 159
    No idea why it would cause the database to crash, but are you modifying the link from the menu suite designer to remove the space navision:/ / ?
  • Options
    AlishaAlisha Member Posts: 217
    This is just a test to try to open the form from an hyperlink, the idea is to be able to pass parameters and then open the form filtering some fields, same way that could be done in previous versions... (<4.00).

    I cannot remove the navision:/ / , once the menusuite is imported, it cannot be open or edited, Navision closes and it's impossible to open the database again..

    Has someone done this successfully? (Using an hyperlink in a menusuite)
  • Options
    ArhontisArhontis Member Posts: 667
    Hi Alisha,

    An idea is to open the database without opening a company and opening Object designer and importing an old menu suit object 90 that doesn't have that specific link, or deleting the menusuite 90 object...

    Then open a company of that database and it might open just fine...

    As for the hyperlink, I "Copy Link" from a form, went to the Sortcuts menu, right click, "Create Shortcut", pasted the link (with [url=navision://..]navision://..[/url].) entered a caption and it works just fine... But this is from the shortcuts, not the menu itself...

    I created a codeunit and pasted the copied link in parts (because one line of code is smaller that the characters included in the copied link):
    HYPERLINK('navision://client/run?servername=..........'+
    'bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla '+
     '%26position=Field3=0(bla bla)%26servertype=MSSQL');
    
    in the OnRun trigger and created a menu item that runs that codeunit and the form opened just fine... Maybe that way is how you could do it...
  • Options
    maris2000maris2000 Member Posts: 71
    The only problem is that import treats // as comment and imports next line as next part of Hyperlink, so before import you must change // to something else (for example / /), and after impord edit menusuite in designer and change it back to //
    How do I cahange / / to //?
    When ManuSuite is opend in designer, there is no code.
    Please help
  • Options
    maris2000maris2000 Member Posts: 71
    edited 2009-06-15
    By the way, the short description of my problem.
    I have a customer form, and I need to set some filters on it. It should show passive and active customers.
    I sholud have 2 menu items for the customer form in the MenuSuite.
    I have added 2 menu items to MenuSuite.(same form 21 Customercard)
    I have added a varible to my form (active bool);
    My OnHyperlink Trigger looks like this
    IF activ THEN 
      Customer.SETFILTER(Passiv,TRUE);
    ELSE
      Customer.SETFILTER(Passiv,FALSE);
    END;
    

    I have exported Menusuite to text file and added line of code
    ShortcutURL=navision:/ /client/run?target=Form%21%activ=false;
    
    Imported the text file with changes back to navision, tried to change / / to //, but can not find where to do it. This is maybe not important because the object gets compiled.
    The MenuSuite object gets compiled, and I can run MenuSuite, but both forms still show the same info.
    Did I miss a point with forms, filters and MenuSuite?
    Please help me
  • Options
    maris2000maris2000 Member Posts: 71
    I have changed OnHyperlink Trigger, so it looks like this now
    SETRANGE(Passiv, activ);
    

    When I open form from the hyperlinks I get the same result. Only active customers, no matter which hyperlink I use.
    [url]navision://client/run?target=Form%2021%26activ=false[/url]
    [url]navision://client/run?target=Form%2021%26activ=true[/url]

    I am still stuck with this, can anybody help.
    I thougth that this would be easy, but it isn't.
    Cannot se what I am doing wrong:(
Sign In or Register to comment.