In the Form "Payment Journal",
I have created a Global Variable "GLReconcile" with Datatype as Form and Subtype as "Reconciliation"
I have added a Menu Item in the Payment Journal which triggers the form through the following C/AL
GLReconcile.RUN;
After the form has been executed, I want to close this form which has been run by using the C/AL .
My query is how can I close this Variable "GLReconcile",as there is no function "Close" for this variable.
Thanks in advance.
0
Comments
Try the following:
1. Create a function on the form:
CloseForm:
CurrForm.CLOSE
2. Call this function from your code.
I followed the solution stated by you, but it gives an error "The form is not open"
I ll tell you exactly in which form I am getting stuck
Payment Journal > Posting > Reconcile.
Here, Reconcile Form is opened from a C/AL code from within the Payment Journal.
I am using this form for some other functionality also, and hence I want to close the Reconcile Form from Payment Journal.
Kindly advice.....
So you should put a SLEEP after the form.RUN.
This way the form has the time to open. (I think this helps but I am not sure).
It is possible you have to put the closing of the second form in the OnTimer-trigger of the first. And use a boolean in the first form to say it's ontimer-trigger must close the second form.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!