Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, July 4, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Calling the onDialogClosing Event
Jason Daraz
Posts: 12
 
Calling the onDialogClosing EventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Sep 09 10:44 AM
I am working on the Insert Account page. I have written some code against the save button that will update the newly created account's owner depending on selections made to some of the picklists on the Insert Account page.

The problem that I am running into is that if the owner is changed to a team that the logged on user isn't a member of SalesLogix shows the error that the Account cannot be found.

I am attempting to circumvent this with my own pop-up message and redirect if the user is not in the team that's been assigned. My code for this currently looks like this:

.
.
.
else
{
Sage.Platform.WebPortal.Services.IWebDialogService messageBox = this.DialogService;
messageBox.onDialogClosing += new Sage.Platform.WebPortal.Services.dlgClosing(messageBox_onDialogClosing);
messageBox.ShowMessage("You have entered an account that you do not have access to view!");

}
}

void messageBox_onDialogClosing(object from, Sage.Platform.WebPortal.Services.WebDialogClosingEventArgs e)
{

Response.Redirect("Account.aspx?");
}

Now the message box appears for the correct users, however, when the user closes the message box it doesn't seem to call the messageBox_onDialogClosing event, and thus doesn't redirect the user. Can anyone help point out where I am going wrong?

Thanks
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Calling the onDialogClosing EventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Sep 09 10:59 AM
You are adding Dialog Events, but not displaying a Dialog, rather a Message.
I am not quite sure what the difference is, but that may be playing into it.

Wouldn't a better approach be to validate the filter the Team options based on the Current user, or to Validate the message before they hit Save?
[Reply][Quote]
Jason Daraz
Posts: 12
 
Re: Calling the onDialogClosing EventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Sep 09 11:22 AM
I'm not trying to prevent the user from adding an account that they cannot view. In fact it's the complete opposite. The reason I went for the on save, is because when I tried updating the owner on the fly as soon as the user hit on an owner that they weren't a member of, the fields went blank and were disabled so they couldn't continue.

This seemed like the best approach to allow them to add the account but make them aware that the account they were adding had been saved but they weren't able to view.

Your idea "to validate the message before they hit Save" is a good one. Using the same logic that I have on the Save button, I can put onchange events on the relevant picklists and when they hit on a match that will eventually cause the update to the owner that they cannot see on the save I can show them a message and remove it if they change them back to something else.

Thanks for the inspiration.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/4/2025 10:13:18 AM