Free Salesforce.com Advanced Search Code
Written by ShamrockCRM on March 4, 2009 – 9:41 pm -Ok, I have decided to be kind. Everyone saw the post about the Advanced Search tool for Salesforce.com already and loved it. Everyone requested it and I am in a very giving mood.
This is such a great little tool. You can’t miss out on this little bit of functionality.
This Salesforce.com code is incredibly simple and very easy to install. This can be used on any edition of Salesforce, including Group, Professional, Enterprise and Unlimited.
1) All you need to do is create a Salesforce Home Page Component.
2) Make this component of type “HTML Area.”
3) Click the checkbox that says “Show HTML.”
4) Add this snippet of HTML into the box:
<script language="JavaScript" type="text/javascript">
function submitSearchForm(){
var searchField = document.getElementById('advsearchfield');
document.advsrch.action = '/search/SearchResults?searchType=2&sen=0&setLast=1&str=' + searchField.value;
return true;
}
</script>
<form name="advsrch" method="post" onsubmit="return submitSearchForm();"><input class="searchTextBox" id="advsearchfield" maxlength="80" size="18" name="sbstr"> <input class="btn" value=" Go! " type="submit"></form>
5) Add this Home Page Component to your Home Page Layout.
6) Done
Wasn’t that easy? This will now allow you to have one simple search box, remove the old complicated one and search through all custom fields. (external identifiers are excellent!)
Let me know if you need help installing this!
tanner@shamrockcrm.com
***Updated 4/1/2009 – Thanks Mike for the Small Improvement to the Code!
***Updated 4/9/2010 – Glenn provided a nifty way to prevent the search box from stealing cursor focus here. He suggests to show an image of a search box and replacing the image on mouseover with the actual search box. You need to take the image from his link above and use the following code below:
<form
id="searchForm"
action="/search/SearchResults?searchType=2&sen=0&setLast=1"
method="post"
name="advsrch"
onmousemove="if(getElementById('textBoxImage')) {document.getElementById('textBoxDiv').innerHTML='<input id=\'searchField\' maxlength=\'80\' name=\'sbstr\' size=\'18\' value=\'\' type=\'text\'><input value=\' Go! \' class=\'btn\' type=\'submit\'>'}">
<div id="textBoxDiv">
<img id="textBoxImage" src="/resource/1269872073000/TextBoxImage2">
</div>
</form>
If you are having problems with the Javascript version, use the below plain HTML version
<form action="/search/SearchResults?searchType=2&sen=0&setLast=1" method="post" name="advsrch"><input class="searchTextBox" maxlength="80" name="sbstr" size="18" value="" type="text"> <input value=" Go! " class="btn" type="submit"></form>
Tags: advanced search, custom objects, home page, html, javascript
Posted in Business Analysis, S-Controls, Salesforce.com | 36 Comments »
Salesforce.com S-Control Training Tips
Written by ShamrockCRM on December 22, 2008 – 9:27 pm -Another simple, but effective Salesforce customization with an S-Control.
Records in Salesforce.com are generally very bland and provide no direction as to what a User needs to do or needs to do next in the system. I created an S-Control that will display whatever kind of HTML text that you would like directly on ANY record in Salesforce.com. This text can be static or it can be constantly changing. For example, you can coach a Salesperson along for each Opportunity Stage based on your Organization’s sales process.
You can detect that a User has not added any Products yet to the Opportunity and you can show them a HUGE red sign saying “Hey, it’s time to add a Product. This is how…”
These can be placed anywhere on the screen, on any time of object, can say anything and can be based on any criteria.
Also, Instruct Users about individual fields! The options are endless.
Obviously, this functionality could really enhance the User experience. Everything will be a little less confusing, User adoption would increase, Users could be notified of recent functionality changes, their business process can be facilitated based on different criteria.
Contact me if this would interest you.
Tags: instructions, tips, Training, users
Posted in Business Analysis, Salesforce.com, Training | 1 Comment »
