Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Avid Listener
Veronka
Posts: 17
Registered: 04-03-2009
Accepted Solution

Popup Message onLoad Event?

Hi,

 

Version Web Client 7.52

 

I thought this would be fairly easy....I tried 2 approaches to show a popup message on Account Detail OnLoad Event. None of them seems to work. Any suggestions?

 

1) Throw new ValidationException it does not show a popup, but an error on the page. (See attachment). ?? In all examples shown it says, it will raise a popup.

2) Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPartInfoProvider a = form.NativeForm as Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPartInfoProvider;

if(a != null)

   a.DialogService.ShowMessage(account.AccountName + " has an open Legal Issue!");

 

Second method shows me the popup, but I cannot close it. When trying to close it, it seems the page gets Loaded again and Popup gets shown again(actually never close).

 

Can anyone help me with this issue?

 

Thanks.

Please use plain text.
Employee
kbailes
Posts: 4
Registered: 06-17-2009

Re: Popup Message onLoad Event?

You are on the right track.  In Application Architect design a new load action for the Account Details quickform, making sure that On Entity Changing = True and On Repaint Event = False so that the action only fires the first time the detail form loads for each record.  Then in the Code Snippet Action Item, since Account Details already is an EntityBoundSmartPartInfoProvider you can go straight to the inherited property DialogService.  Again, the included snippet is for use in a Code Snippet Action Item.

Add using: using Sage.Platform.WebPortal.Services; IAccount account = form.CurrentEntity as IAccount; if (account != null) { if (SomeConditionToShowActionRequired) { string message = (account.AccountName + " has an open Legal Issue!"); IWebDialogService dialog = form.Services.Get<IWebDialogService>(); dialog.ShowMessage(message); } }

 

 
Please use plain text.
Avid Listener
Veronka
Posts: 17
Registered: 04-03-2009

Re: Popup Message onLoad Event?

Thank You !!!
Please use plain text.