Hi everybody,
I have a complicated problem, I'm not sure how to solve. I have a User maintenance form which has a pageframe with 3 pages. First is User's info, second is roles info and third is profile's info (for each role we may have multiple profiles).
Now, suppose I deactivate user's role (I have a checkbox for this). Obviously all profiles for this role become deactivated too. This works well when I press Save button while I'm on the Roles page. However, user can switch between pages. When user tries to change a page and something was changed on the page, the question is asked "Do you want to save changes? Yes/No/Cancel". So, if I pressed the checkbox to deactivate a role, then try to switch to Profiles page and answer Yes on the question, I should remain on the Roles page and Profiles page should become disabled.
Now, I have the following code in Page2 (Roles page) Deactivate:
if thisform.oBizObj.IsChanged() and thisform.AskToSave() = IDCANCEL
nodefault
else
endif
I can add a check for iActive_Flag, but nodefault should be placed only if I'm trying to switch to Profiles page. The first page still should be accessible.
So, do you see, how should I solve this problem?
Thanks a lot in advance.
If it's not broken, fix it until it is.
My Blog