How to reopen a Document after adding

On FormDataAdd event, what is the script to reopen the document ?

I used the command  MenuItem.GetFromUID("2049").Activate()   on quotation, but sap open an empty form in add mode, I think I need to scroll back 1 record

could you help me please

thanks 

0

Comments

2 comments
  • Good morning,

    it can be done by storing the last docEntry in a global variable and reopen that.  However, with version 10 of SAP Business One, it will be possible to "Add and Open" document via dropdown on the "Add" button.  So, in Version 10, it is possible to set this as standard behaviour.

    Stefan

    0
    Comment actions Permalink
  • Hi Stefan, 

    Thanks for the comment, but unfortunately I still have to stay on 9.3.

     

    I tried after the formadd event to open the document with the command  "customize.B1Connector.GetB1Connector().Application.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_Quotation, "149", DocEntry.ToString)", but I don't know why it goes on a loop.

    can you give me a working code please

    thanks in advanced

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post