Options

Dataport export execute problem

Red-EagleRed-Eagle Member Posts: 107
I have an dataport for exporting purchase orders to a .txt file, which is working fine in the object designer.
I have put this dataport in form 50 on the menu button functions where i take the action runobject dataport99999. That is working, but i want to make it a little better. It would be nice when you are in for example in purchase order IO07777 and you choose to run the dataport this purchase ordernumber would put automatically in the filter of the dataport.
Besides that i have a little problem when i execute this dataport export the screen of the purchase order goes back to this number of the purchase order IO00001. Is it possible to go back to the purchase order which you executed (IO07777)?

Comments

  • Options
    kash387kash387 Member Posts: 111
    Hi,

    On the menu button, instead of selecting run object, press F9 and go to C/AL editor....

    OnPush() trigger....

    yourDataport.SETTABLEVIEW(Rec);
    yourDataport.RUN;

    yourDataport is a variable of Dataport datatype...

    Your both problems will be solved...!!!
    Thanks,

    Kashyap
  • Options
    rhpntrhpnt Member Posts: 688
    Lookup SETRECFILTER and SETTABLEVIEW in NAV online help. I leave the rest to you - learning by doing ;-).
  • Options
    Red-EagleRed-Eagle Member Posts: 107
    Thnx you for your quick response. Is there an other solution? We have not the rights to start C/Al Code in the forms unfortunally.
Sign In or Register to comment.