The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Dialog closed by the "x"
Posted: 16 Jan 13 12:32 PM
|
fiogf49gjkf0d We have an issue where soetimes users will click the small "x" in the right hand corner of a popup or dialog box. This circumvents any of the mandatory data checks we have in place. How can I catch the "x" click .
I looked up and was trying to work through the Dialogresult , however that doesn't seem to be the right method.. any hints..??
Even if someone could show me how to remove the x it would be ok.. since we have buttons to control the other items.. Here is what I am trying to use.. |
|
|
|
Re: Dialog closed by the "x"
Posted: 16 Jan 13 12:52 PM
|
fiogf49gjkf0d Here is code I am trying to use:
<p>public void usrCancel_OnClick(Object sender, FormViewPageEventArgs e){
if(e.Cancel){
throw new Sage.Platform.Application.ValidationException("Alert - You must close from the buttons below");
}
} |
|
|
|
Re: Dialog closed by the "x"
Posted: 16 Jan 13 4:57 PM
|
fiogf49gjkf0d I thought clicking on the X cancelled the Save.....what data checks are you trying to make on data that was just saved prior to clicking on the X? (and I don't know how to trap the 'x', although I'm sure someone does....) |
|
|
|
Re: Dialog closed by the "x"
Posted: 16 Jan 13 5:03 PM
|
The sequence comes from the Opportunity Status..
Change to Closed Won it posts back the change to fire the OnChangeEvent to launch dialog screen.
We change the closed value to represent the NET value not the salepotential so set it to 0 on launch so user has to enter something.
if someone doesnt change values or makes value blank for closed won and hits "X" the opportunity stays closed-won however the value could be 0 or blank then
so need to intercept the "x" click or remove it from the window
|
|
|
|
Re: Dialog closed by the "x"
Posted: 16 Jan 13 6:52 PM
|
fiogf49gjkf0d Got it.....current SLX Approach is to reset this stuff after the dialog has closed, and is fired on the X (Cancel)...makes sense to trap it ON the dialog.... |
|
|
|
Re: Dialog closed by the "x"
Posted: 17 Jan 13 9:27 AM
|
fiogf49gjkf0d Have you considered onBefore Save Business Rule?
if (opportunity.closed =="Closed-Won" && salespotential = 0)
{
dialogservice.showMessage("I can't save this record because you forgot to enter the value, silly.");
break;
} |
|
|
| |
|
Re: Dialog closed by the "x"
Posted: 17 Jan 13 2:53 PM
|
Sorry Rich, thought your comment "Change to Closed Won it posts back the change to fire the OnChangeEvent to launch dialog screen." indicated the "Closed-Won" had already been captured.
The only other thing I can think of is if you can open the Dialog window from code, calling out the window parameters.
|
|
|
|
Re: Dialog closed by the "x"
Posted: 21 Jan 13 2:28 PM
|
Carla, I know it sounds strange.. the Opportunity Detail "Status Field" when changed to closed-won does postback, which fires the Onchange Event.. the Onchnage event calls the dialog window..
On the dialog window we have checks for net and gross revenue amounts and if user uses the buttons on form everything is great.. just if the click the x to close the dialog.. for some reason I can't seem to see the WebForm properties or I can add check to Form.Close == UserCancel
Sigh
Thanks for the help |
|
|
|