cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
texmags
Level 3

Dialog - enable/disable next button based on a call to managed custom action

(IS 2009, Basic MSI)

Hi, I have a case I'm having a hard time to get to work exactly the way I want. I have a custom dialog where the user needs to fill in registration information. When the user has filled in everything and clicks on the push button "Register", it makes a call to a managed custom action which contacts our server and validates the user. Either SUCCESS or FAILURE is returned to the property REGISTERUSER_RC.

This all works fine, my problem is that I would like to the "Next" push button to be disabled until the property has the value "SUCCESS" similar to how the dialog "LicenseAgreement" works.

On the Next button's behavior I have the following set:

under Events

NewDialog, ReadyToInstall, REGISTERUSER_RC = "SUCCESS"

under conditions

Disable, REGISTERUSER_RC <> "SUCCESS"
Enable, REGISTERUSER_RC = "SUCCESS"

My problem is that the Next button stays disabled even after I have clicked on the "Register" push button. If I remove the condititions but leave the setting under events as before then it behaves like I would expect, it doesn't navigate to the dialog "ReadyToInstall" when I click on the "Next" button unless I have clicked on the button "Register" first and the property has been set to "SUCCESS".

I am logging inside my custom action so I know what is being passed back and I also have a temporary pushbutton on the dialog that calls an installscript function to show the value of the property REGISTERUSER_RC and it is set to "SUCCESS" after I clicked on Register. Perhaps there's an easier way to validate what a property is set to inside a dialog.

I have also tried to just leave the "Conditions" behavior as above and set the condition under "Events" to just the value 1, but it doesn't ever enable the Next button then either.

Any ideas?

TIA,
Magnus Lassi
Labels (1)
0 Kudos
(2) Replies
texmags
Level 3

Never mind, I decided to have the DoAction call on the Next button instead and it works as expected now. Initially I tried to have it on the Next button but perhaps there was some other issue that prevented it from working back then.

I assume it's more of a standard to have that type functionality taking place when the user clicks the "Next" button instead of having a separate button that does it.
0 Kudos
Christopher_Pai
Level 16

MSI is a bit limited in this area. The messages/property changes happen to late to be useful in the way you initially wanted.
0 Kudos