Hi together,
does anyone have an idea who to close a form out of a subform (i.e. sales order)? I only know about the "currform.close"-statement but this doesn't work out of the subform. Any hints?
Thanks a lot.
Best regards from Germany.
N. Gebhard
ProTAKT Projekte & Business Software AGMicrosoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt 0
Comments
Hope this helps.
Regards,
Frank
I already tried to use a function in the main form. In the subform, I refer to this function. The function in the main form sais: currform.close! But I get the error message, that the form is not opened! Even if I run it modal. What's my mistake?
Thanks a lot.
Best regards,
N. Gebhard
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
You can use the Ontimer trigger of the Mainform as pduck says, or you can use the way i told before.
If you need more info, the post a repley.
Regards,
Frank
thanks a lot for your help, but I still don't get it. I have a codeunit with two simple functions. One to run the mainform modal. This works so far.
Now, I wanted to create the second function which should close the form again. I wanted to call this function out of the subform. But I don't know how to define the function, that the form will be closed.
Sorry, for asking again and again but it just doesn't work. :?
Best regards,
Nicole
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
Then you have to declare a global variable, say YourForm of Type Form and Subtype the Form, you want to run.
After that make two functions
1st with: YourForm.RUNMODAL; to start the form
2nd with Yourform.CloseFormSubform; where CloseFromSubform is a function in your mainform, you have to create. In that you say: Currform.CLOSE;
This should do the work.
Regards,
Frank
thanks a lot for your help! I forgot the property in the codeunit. Now it works as I wanted. I just get the message to clear the form on every second run, but this I will hopefully get by myself!!!
Thank you very much!
Best regards,
Nicole
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
Try it with CLEAR(YOurForm); before you call Yourform.RUNMODAL;
Regards,
Frank
I have been browsing the forum for long on this topic. Purchase order form is my main form. PO authorization form (customized form) is opend from PO form. Again one more form is opened say PO edit form from PO authorization form. I am stuck at the closing of the two subforms!!...as these links tell, I have created single instance codeunit to open PO authorization form from Purchase order form modally. But I am confused where should I create close function. Is it in Purchase order form or in PO authorization form. I have tried both, but getting error message 'form is not open'...please help.
Regards,
Manju