Menu Item

rj5570rj5570 Member Posts: 157
Ok, i have searched and searched and can't find anything on this.

I created a new form that I wanted to run from an invoice card, but i cant get it to pass the invoice.no. to the report window.

any suggestions? ](*,)
- So it Goes.

Comments

  • DaveTDaveT Member Posts: 1,039
    Hi,

    Is it a report or form you created?

    Create a function in the form/report and assign the invoice no. to a global variable. Then declare a variable for the form/report and call the function first. You can also pass a record variable down if required.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • rj5570rj5570 Member Posts: 157
    hummm ok not sure how to assign the invoice no.
    - So it Goes.
  • DaveTDaveT Member Posts: 1,039
    Can you explain more clearly what you need and where you need to assign the invoice no.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • rj5570rj5570 Member Posts: 157
    sure,

    when you have an invoice card open (or any card to that matter) on the menu button Print I added a menu item for a report I wrote. There is a required filter for the field No. from the invoice header. I want it so when you select that menu item, the invoice no. will default to the current invoice opened in the card. right now its blank on the filter field

    make sense?
    - So it Goes.
  • DenSterDenSter Member Posts: 8,305
    Open a posted shipment or something and hit the print button, with the debugger on. Follow all the steps and oyu will see how the Shipment Number ends up in the request form of the report. You can then apply the same principle to your report.
  • DaveTDaveT Member Posts: 1,039
    Hi,

    Now I understand. This is quite straightforward. Create a record variable for the sales header e.g. SalesHeader. Set you filters on it i.e. Invoice no. then call the report with the record variable

    i.e. (off the top of my head)
    SalesHeader.Reset;
    SalesHeader.setrange( "document type", "document type" );
    SalesHeader.setrange( "No.", "no." );
    report.runmodal( 50000, True, False, SalesHeader );
    

    Hope this helps
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • rj5570rj5570 Member Posts: 157
    ya, i already have a script like that in there.

    thats why i am confused.

    basically i just admended the invoice and saved it under the 50000 series the original still pulls the invoice no. but the new one doesnt.
    - So it Goes.
  • SavatageSavatage Member Posts: 7,142
    Invoice or Posted Invoice?

    Where are you putting your code? ON the OnPush of the menu item?
  • rj5570rj5570 Member Posts: 157
    no code on the push, is that my problem?

    posted
    - So it Goes.
  • rj5570rj5570 Member Posts: 157
    dont see how to put any code on the push
    - So it Goes.
  • SavatageSavatage Member Posts: 7,142
    Does Your license allow you to enter c/al code?
    If you go to the form & goto designer - right click on the button - you should see menu items.
    Select Menu Items & you should see all the menu choices. Put your cursor on the menu you want to adjust - hit f9 - it should bring you to the cal editor if your allowed.
  • rj5570rj5570 Member Posts: 157
    no i dont,
    - So it Goes.
  • kinekine Member Posts: 12,562
    This is common problem when you have only Report Designer granule. You cannot add the code to the form. In your case, you need someone with the developer license to add the code into the object (your Microsoft Partner).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • hs_mannhs_mann Member Posts: 17
    Hi

    If you want to permanently replace the report by your own report when you hit the Print button on invoice then you can change it under
    Sales & Marketing -> Order Processing -> Setup -> Report Selections.

    Harjot
  • rj5570rj5570 Member Posts: 157
    ya, we just dont have the need to spend the amount of money for that granuler...

    oh well, employees can just copy and paste the number in there

    guess this is solved :)

    rj

    ps
    what a crappy thing that you cant use the properties for the push of a parameter.
    - So it Goes.
  • SavatageSavatage Member Posts: 7,142
    I suggest write down all these tiny changes, and this one can be done in 1 minute.

    Then when you have a bunch of little changes, submit them to your solution center so they can knock them all out at once.
  • rj5570rj5570 Member Posts: 157
    thats a good ideal!!!!
    - So it Goes.
Sign In or Register to comment.