Menu items executed one after another

MaliMMaliM Member Posts: 11
Menu items executed one after another from the first to the last.
On the form there is a menu button with 3 menu items. Menu item has code on their's OnPush() trigger. Menu items have filds ShortCutKey, Action and RunObject empty.
I select the first Menu item, after execution finished, program starts the second menu item and after that the third.
The same happened when I select the second menu item. After execution program starts the third menu item.
How can I prevent executing the second and the third menu item?
Thank's for answer.
Navision 4.00 SP2.
Martin

Answers

  • DaveTDaveT Member Posts: 1,039
    Hi Martin,

    This sounds like very stange behaviour - what cal code are you using to call the forms.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • BeliasBelias Member Posts: 2,998
    activate the debugger with breakpoint on triggers on, and see what code is executed
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • MaliMMaliM Member Posts: 11
    Hi, Dave

    1. menu item:
    CurrForm.SETSELECTIONFILTER(SalesInvHeader);
    SalesInvHeader.PrintRecords(TRUE);
    
    2. menu item:
    CurrForm.SETSELECTIONFILTER(SalesInvHeader);
    REPORT.RUN(13024546,TRUE,TRUE,SalesInvHeader);
    
    Thank's for quick replay
    Martin
  • DaveTDaveT Member Posts: 1,039
    Hi Martin,

    I suspect that you problem is the report selection table as opposed to the code. I suspect that there is multiple line for the sales invoice and the call to the SalesInvHeader.PrintRecords(TRUE); will print all reports specified.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • MaliMMaliM Member Posts: 11
    I just install client once more. It works fine :D
    Martin
  • BeliasBelias Member Posts: 2,998
    MaliM wrote:
    I just install client once more. It works fine :D
    Martin
    :shock: THIS! is strange...
    i've had the same idea of daveT
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • MaliMMaliM Member Posts: 11
    Reinstall client wasn't solved the problem. After reinstall I tested the wrong company :? . The problem was only in one company.
    Solution:
    Sales & Marketing/Order Processing/Setup/Report Selecion - Sales
    For invoice I had 3 choices in this setup. So program executed all of them one after another. I cleared two of them and problem is solved.
  • BeliasBelias Member Posts: 2,998
    did you noticed that tiny field named "sequence" in report selection table?
    it is part of the key, and if a report has 1,2,3 (three lines) the respective reports (Report ID field) will be run one after the other...It's not a bug, it's a feature :wink:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • MaliMMaliM Member Posts: 11
    Yes I did. Anyway thank's for explanation.
  • DaveTDaveT Member Posts: 1,039
    Thanks for the update - I was starting to doubt myself :mrgreen:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.