Problem with ABL Dialog

Posted by Admin on 18-Jul-2010 09:49

I have an ABL Form with an UltraGrid bound to a ProDataset that displays Account Receivable details. I run an ABL dialog from this Form that displays Open Item transactions for the selected account receivable record. I run the ABL Dialog using the following code:

METHOD

PRIVATE VOID openItemAllocationsToolStripMenuItem_Click( INPUT sender AS System.Object, INPUT e AS System.EventArgs ):

    

     DEFINE

VARIABLE vcOpenItem AS AR.wAROpenItem NO-UNDO.

     DEFINE VARIABLE endDialogResult AS CLASS DialogResult NO-UNDO.

    

     vcOpenItem =

NEW AR.wAROpenItem(). /* Open Item Dialog */

     vcOpenItem:ShowModalDialog().

     IF

EnumHelper:AreEqual( vcOpenItem:DialogResult, System.Windows.Forms.dialogResult:OK ) THEN DO:

          MESSAGE 'Allocations Done' VIEW-AS ALERT-BOX.

     END.

     vcOpenItem:Dispose().

     RETURN.

END METHOD.

Everything works fine the first time I run the ABL Dialog. I can also run it multiple times on the first record I select with no problems. If I select a different record and run the dialog, it appears that the UltraGrid in the dialog is created exactly the same size (number of lines) as the previous time it was run, and I get error messages about no transaction records available. The errors occur in the ShowModalDialog method in the dialog.

I know that the ProDataset is being populated with the new records (less of them than previously). It is almost as if the same "version" of the dialog is being loaded, and that a new one is not being generated each time I run the dialog.

Also, if I do not display the message, the WAIT-FOR statment in the ShowModalDialog method never seems to end.

Any help would be greatly appreciated.

Allan Green

All Replies

Posted by Roger Blanchard on 18-Jul-2010 11:39

Don't you have to delete object vcopenitem ?

Sent from my Verizon Wireless BlackBerry

Posted by Admin on 18-Jul-2010 13:36

I did try that. made no difference at all.

Allan

Posted by Admin on 18-Jul-2010 13:49

Try RefreshAll() on the ProBindingSource.

Posted by Admin on 20-Jul-2010 09:33

What kind of code you have in the AR.wAROpenItem  [ the dialog form ] ???

Can you attach the screenshot of it ?

If there is a dataset used in it ... are you filling it each time you open this dialog form [ AR.wAROpenItem ] ??

This thread is closed