Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 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: Set smartpart toolbar button visibility at runtime
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Set smartpart toolbar button visibility at runtimeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 09 8:17 AM
On the opp insert screen I would like to hide the add button on the opp contacts smart part at run time - so I would like the primary contact to display and get added as happens oob, but not allow the users to add others on the insert.. Is this possible?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Set smartpart toolbar button visibility at runtimeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 09 8:31 AM
It should be possible yes - the button should have an id, something like cmdAddContact etc., just set its visible property to false...

//cmdAddContact.Visible = false;

This could be in a quickfornmload or on a changeaction of an item on the screen, depending on when you need it called.

Is that what you were after, or did I misunderstand your requirement?
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Set smartpart toolbar button visibility at runtimeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 09 10:21 AM
Thanks Nick. That makes sense but the part I can't quite get is how to only hide the button when the smartpart is in the insert opp screen.. I want it visible when it is a tab off the opp detail. Is there a way to tell if the opp contact smart part is being displayed from the insert screen vs. as a tab off opp detail?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Set smartpart toolbar button visibility at runtimeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 09 10:49 AM
The easiest way I guess is to see if the current Opp has an Id - if its Insert it will be null, so in quickformload...

//Sage.Entity.Interfaces.IOpportunity opp = GetParentEntity() as Sage.Entity.Interfaces.IOpportunity;
//if(opp.Id == null)
//{
//cmdAdd.Visible = false;

//}

Should do the trick. Or you can reference the querystring, look for the modeId, something like :
//if(Request.QueryString["modeId"] != null) { string mode = Request.QueryString["modeId"]; if(mode == "Insert") {//We are in Insert...}}
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Set smartpart toolbar button visibility at runtimeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 09 11:13 AM
Spot on - in retrospect I should've come up with that on my own but I appreciate the help. Thanks
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Set smartpart toolbar button visibility at runtimeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 09 2:26 PM
Quote:
Originally posted by Steve Knowles

Is there a way to tell if the opp contact smart part is being displayed from the insert screen vs. as a tab off opp detail?


Steve, I also have a write up of ways to determine the page mode here: http://customerfx.com/pages/crmdeveloper/2009/04/20/determining-the-page-mode-at-runtime-in-saleslogix-web.aspx

-Ryan
[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): 8/18/2025 2:22:29 AM