Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Cancel popup during 'onpopup' event
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 9:57 AM
I would like to check for a condition, then cancel the popup in certain situations. I am trying the following code, but keep getting stuck in a loop when I add this line of code:

pklReasonDealDied.popup.cancel

Is there a way to do this?

Thanks

Sub pklReasonDealDiedPopup(Sender)
'Check to make sure Lost/Closed deals tab is visible to prevent errors when updating status
If Application.BasicFunctions.GetTabVisibleProperty("Personal:LostClosed Deal Details") Then
txtReasonDealDiedOriginal.text= pklReasonDealDied.text
Else
msgbox "Please make the 'Lost/Closed Deals' tab visible to allow changing this status."
pklReasonDealDied.popup.cancel
exit sub
End If
End Sub
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 10:37 AM
Actually I got around this issue, but would still like to know if I can cancel a popup during the OnPopup event. Thanks
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 12:35 PM
Are you trying to prevent/cancel the popup of a form, picklist, lookup, etc?

There is Application.BasicFunctions.CurrentViewCancelShow, but I've found the best approach is to instead prevent it from popping in the first place based on the condition instead of trying to cancel it from showing once it's already be launched. KWIM?
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 12:43 PM
Yes, I KWYM. My original post was regarding a picklist. I have used the CurrenViewCancelShow before with good results for forms. I did take a different approach to the problem, but am still curious if I could stop a picklist from displaying during the onPopup event, or if once fired you get the list regardless.

Thanks
[Reply][Quote]
Rob Bartram
Posts: 98
 
Re: Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Sep 07 8:44 AM
Steve,

I just had a similar need. To cancel the popup in the onPopup event, I just set the .picklistname.name = "". This completely suppresses the popup. This works on SLX 6.2.6, I'm not sure about other versions.

One note though is that you have to set the picklistname at the beginning of the onPopup event or else the next time the user clicks the popup button, after the picklist has been cleared, nothing will be shown.

For example
Sub pklStatusPopup(Sender)

pklStatus.PickListName.Name = "Account Status"

'Do some evaluation and if required clear the picklist name to suppress the popup

pklStatus.PickListName.Name = ""

End Sub
[Reply][Quote]
Todd Hardin
Posts: 43
 
Re: Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Sep 07 1:04 AM
Interesting trick Rob - way to think outside the box. I'll keep that idea in my tips and tricks box - thanks!
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Cancel popup during 'onpopup' eventYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Sep 07 6:33 AM
Quote:
Originally posted by Rob Bartram

Steve,

I just had a similar need. To cancel the popup in the onPopup event, I just set the .picklistname.name = "". This completely suppresses the popup. This works on SLX 6.2.6, I'm not sure about other versions.

One note though is that you have to set the picklistname at the beginning of the onPopup event or else the next time the user clicks the popup button, after the picklist has been cleared, nothing will be shown.

For example
Sub pklStatusPopup(Sender)

pklStatus.PickListName.Name = "Account Status"

'Do some evaluation and if required clear the picklist name to suppress the popup

pklStatus.PickListName.Name = ""

End Sub

Rob,
Very creative approach. I like it!!!
[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): 6/20/2025 10:37:10 AM