I have two buttons that open the same dialog window. I need to set the visibility of the dialog fields depending on which button is clicked.
Solved
How to set visible or enabled in DialogWindow?
Best answer by Django
When you call Dialog.AskExt() you can indicate a method to call to initialize the dialog. So each PXAction button can initialize itself the way that you need.
WebDialogResult result = TheViewUsedToShowTheDialog.AskExt(InitializationMethod1, true);
if (result == WebDialogResult.OK)
{
...
}
private void InitializationMethod1(PXGraph graph, string name)
{
//set up your virtual DAC field visibility and field values here for the first configuration
}
private void InitializationMethod2(PXGraph graph, string name)
{
//set up your virtual DAC field visibility and field values here for the second configuration
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.