Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Avid Listener
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.

Employee
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); } }

 

 
Avid Listener
Posts: 17
Registered: ‎04-03-2009

Re: Popup Message onLoad Event?

Thank You !!!