I have a dialog with first/previous/next/last navigation buttons. I�m using the action script �Load Primary Keys� in the onDialogInitialize event. This works fine when the dialog is run by itself and not launched from another component.
I also want to open this dialog from a grid and pass the dialog a primary key value. I want the dialog to populate the controls with the data for the primary key value that I�m passing to it. I�m using �Populate Dialog from Tables� to automatically populate the controls for the given primary key. This works as well.
My problem is that I want to use both �Load Primary Keys� and �Populate Dialog from Tables� when the dialog is opened from a grid so that it will populate the dialog with the correct row and also allow the user to navigate to other rows using the nav buttons. When I use both action scripts, the �Load Primary Keys� seems to override the �Populate Dialog from Tables� and always displays the first row. It doesn�t matter which order I call them. I have even converted the �Load Primary Keys� action script to xbasic and removed the line of code that navigates to the first record - "{dialog.object}.navigateRecord('first').
Does anyone know how to do this? I haven�t spent too much time looking through the �Load Primary Keys� xbasic code because I�m hoping there might be a more elegant way.
Thanks
I also want to open this dialog from a grid and pass the dialog a primary key value. I want the dialog to populate the controls with the data for the primary key value that I�m passing to it. I�m using �Populate Dialog from Tables� to automatically populate the controls for the given primary key. This works as well.
My problem is that I want to use both �Load Primary Keys� and �Populate Dialog from Tables� when the dialog is opened from a grid so that it will populate the dialog with the correct row and also allow the user to navigate to other rows using the nav buttons. When I use both action scripts, the �Load Primary Keys� seems to override the �Populate Dialog from Tables� and always displays the first row. It doesn�t matter which order I call them. I have even converted the �Load Primary Keys� action script to xbasic and removed the line of code that navigates to the first record - "{dialog.object}.navigateRecord('first').
Does anyone know how to do this? I haven�t spent too much time looking through the �Load Primary Keys� xbasic code because I�m hoping there might be a more elegant way.
Thanks
Comment