Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, February 21, 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: Creating a filter to hide certain notes from notes/history
Gazz
Posts: 9
 
Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jan 14 4:29 AM

Hi All


I'm trying to create a filter to hide certain notes from "notes-history" pane in the form of a tickbox, I've noticed that there already is a "Filter Options >>" button which can show or hide the tickbox ribbon. When I search through the plugin manager to find this tickbox ribbon form I can't find it anywhere! I can find the "notes-history" form no problem, what I have also found is a script called "notes history common" which does seem to have a list of tickbox labels that match the labels in the tickbox ribbon.


(Below is the code snippet that lead me to believe I'm in the right place)


'Set the Filters: label
    If (chkMyHistory.Text = "T") or _
       (chkUser.Text = "T") or _
       (chkDateRange.Text = "T") or _
       (chkWithinLast.Text = "T") or _
       (chkActivityType.Text = "T") or _
       (chkHideDBChanges.Text = "T") Then
       cmdOptionsFull.Visible = True
       cmdOptionsEmpty.Visible = False
    Else   'No filter options are turned on
       cmdOptionsFull.Visible = False
       cmdOptionsEmpty.Visible = True
    End If


So I need advice on the script itself as I think I've found where it should go!


Regards


Gazz

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jan 14 4:43 AM

There's no "ribbon". It's basically a panel. If you click the panel that surrounds the control you can drag it down.... !


Also, if you look at the code behind the Filter button you can see it does this on the fly..


Sub OptionsClick(Sender)
    If right(Sender.Caption,2) = ">>" Then  'DNL
       pnlFilterOptions.Height = Application.Environment.PixelsPerInch * 84/96 '84 Changed this for 120 DPI
       cmdOptionsEmpty.Caption = Application.Translator.Localize("Filter Options <<")
       cmdOptionsFull.Caption = Application.Translator.Localize("Filter Options <<")
    Else
       pnlFilterOptions.Height = Application.Environment.PixelsPerInch * 30/96 '30 Changed this for 120 DPI
       cmdOptionsEmpty.Caption = Application.Translator.Localize("Filter Options >>")
       cmdOptionsFull.Caption = Application.Translator.Localize("Filter Options >>")
    End If
End Sub


That is, extends or shortens height of panel for the ribbon.

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 14 7:18 AM

Hi Mike


I clicked on "Filter Options >>" to reveal the 'Panel' but it doesn’t move for me, but this isn’t an issue as I don’t need to be able to drag/move it. I only need to be able to add another tickbox to it, then when I tick the tickbox I want it to hide only the notes that have the username 'SF' but leave all other notes visible if that makes sense!


Regards

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 14 8:38 AM

No, it won't move in Architect. Press it in saleslogix.exe and you'll notice it expands (gets height = larger). In architect you grab the container panel (pnlFilterOptions) that surrounds the whole set of controls - you'll notice a bottom grab handle. Holding down the left mouse you can drag it downwards and it will then expand (or you can go to the panel pnlFilterOptions props and set the height from, say, 30 to 150, same thing).

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Feb 14 5:11 AM

I can see what you mean, thanks for pointing that out. I now need to figure out how to filter out all note/history records where username = SF. Not sure where to start so I'll look for a script that does something similar then adapt to suit.


P.S I'm always open to good advice if anyone has any.


Regards

[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 14 5:34 AM

When you say "create a filter to hide certain notes from "notes-history" are you trying to hide say notes about meetings..? and who are you trying to hide them from..? are they hidden from all users but visible to the Account Manager ? a Team ?


 


if it is to be seen say by either a role.. aka manager or a team you could use the seccodeid or a role to check if that note should be displayed in the actual query..


 


Where Seccodeid = "teamid"


 


Where User.Role = "role"


 


Not sure to what extent to trying to hide

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 14 8:45 AM

Hi RJ


I mean that I want to hide all history records where the username = SF, I want this to happen for all users. I've already added the tickbox for it but it's the script that has me stumped.


Thanks

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 14 8:49 AM

Also I have the user ID if that would be useful?

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 1:56 AM

Gazz - it's really quite simple once you get the hang of it !


Add your checkbox - in the OnClick event set the value to 

CheckBoxChange

You'll notice this common to every History view. If you double-click, you'll see it goes and calls CommonCheckBoxChange which is an include script.


Open the script "Notes-History Common" script


In here locate

CommonCheckBoxChange 


Just before the For i = 0 To grdHistory.Columns.Count - 1 add the following, following same example as SLX:



    If chkMyControl.Text = "T" Then<br />       strGridSQL = strGridSQL & " AND (myCol <> 'XYZ') "  'DNL
    End If


Where chkMyControl is the name of your control. Add the SQL you wish to apply.


That's it. It'll now work - however, you'll need to add a dummy control of same name (chkMyControl) to each form (Account, Contact, Opportunity) - as this script is shared. You can just hide it on the ones you don't need it for.

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 5:05 AM

Hi Mike


I followed your steps, added my SQL and it works!!!


Thanks for the advice, I will have a better idea of what to do next time I'm asked to do this kind of work.


I also added 'dummies' to the Accounts form, Lead form & Opportunity form as these seem to be the only forms that have a notes/history tab. The notes/history tab in Accounts works fine but I'm getting a blank history grid for Lead and Opportunity, no errors though!


I've checked to see if I done something in Accounts that I didnt do in Lead & Opportunity but cant find anything.


Regards

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 5:07 AM

Good news ! Just to be sure - you added the dummy objects to the Notes-History of each of those (Account: Notes-History, Contact:Notes-History etc). Not the main acc/con forms right ?

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 5:36 AM

My mistake, I did add dummy objects to main forms... now fixed and working fine on all forms.


Thanks for all your advice Mike, starting to like slx but I'm still very much a beginner.


You can consider this case closed


Regards

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 5:45 AM

Good news (again). After a small amount of time - you'll get used to it and it's actually very easy (and powerful) as you can do pretty much anything you want etc.


If you are modifying existing forms - then you just need to beware of code-reuse. This comes via Include Scripts and the use of common functions (which you need to be aware of of course). However, in your case (if you'd have needed it) you could have made 1 change and affected 3 forms simulaneously which is great for not needing to make 3 changes of course.

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 6:09 AM

Sounds very interesting, my company wants to make me their go-to guy for slx so I would say your going to see alot more of me. Cool

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 6:16 AM

I will send you a paypal SendMoney email address then !

[Reply][Quote]
Gazz
Posts: 9
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 6:21 AM

And I'll send you our VPN credentials and set you up with an slx login when I'm asked to make another customisation lol.


only joking

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Creating a filter to hide certain notes from notes/historyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 14 6:41 AM

Not a problem - it's what we do !!! www.empath-e.com !

[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): 2/21/2025 5:17:39 AM