Wednesday, March 30, 2016

Graphics Pack for Salesforce

In many cases, we would like to display a value as image, so this will catch user attention better (make sure the image is located in proper area in page layout). With formula field, this should be not an issue, but sometimes, we just need to find a right image and upload it to a document folder.

Salesforce by default provide hundreds of icon, you can find it here Icons Available for Use, see this sample:
IF(Closed_Won_Amount__c>100000, IMAGE("/img/samples/stars_500.gif","5"), 
IF(Closed_Won_Amount__c>50000, IMAGE("/img/samples/stars_400.gif","4"), 
IF(Closed_Won_Amount__c>30000, IMAGE("/img/samples/stars_300.gif","3"), 
IF(Closed_Won_Amount__c>10000, IMAGE("/img/samples/stars_200.gif","2"), 


** Closed_Won_Amount__c is a roll up summary from Opportunity Amount.

But if standard images provided are not enough, you can download a package from AppExchange called Graphics Pack. This is free provided by Salesforce Labs. Once installed, you will get thousand of images in Document folders.

Click Graphics Pack Overview tab from Graphics Packs app menu to see list of the images provided by Graphics Pack. 'Graphics Pack' contains hundreds of images / icons that can be used in salesforce applications for tabs, image formulas, and Visualforce pages
- Additional graphics for image formulas
- Additional graphics for tabs
- Additional graphics for Visualforce pages

IF( NOT ISNULL(SLAExpirationDate__c), IF (SLAExpirationDate__c > Today(), IMAGE("","Over SLA"), IMAGE("/servlet/servlet.ImageServer?id=01590000000J9eb&oid=00D90000000H7oz","Not over SLA") ),"No SLA identified")

If you notice, in the 1st IMAGE() formula, I use full URL in a custom domain and 2nd formula with relative URL /servlet/servlet.ImageServer?id=01590000000J9eb&oid=00D90000000H7oz
I would suggest to use 2nd formula as best practice.

How to get the URL?
Open the image from document folder, right click the image and select "Open in new tab" if you use Google Chrome or similar menu using other web browser, get the URL and you will get something like this - You just need to copy after .com until before &lastMod, so it would be /servlet/servlet.ImageServer?id=015500000028BXr&oid=00D300000000SHq notice that it is similar with sample above in 2nd IMAGE() formula.

Type: AppExchange (Not Managed Package)

Paid/Free: Free

Publisher: Salesforce Labs



Version: 1.2.0

Blog last updated: 30 Mar 2016

Saturday, March 26, 2016

Mass Actions

Ever wonder if you can do Mass Edit, Mass Update, and Mass Delete from List View or Related List page layout in Salesforce?

Out of the box, you cannot do this in Salesforce, you need to use Data Loader or other data management tools. But wait a second, what is the different between mass edit with mass update? In this context:

Mass Edit - to update multiple selected records in View for multiple fields, you can enter value for each record and field manually.

Mass Update - to update multiple selected records in View for a selected field with the same value. Use case: to update multiple opportunities to new Stage at once.

With Mass Actions app available free in AppExchange, you can do this without need to hire a developer. Both screenshots above taken from Mass Actions app. Imagine productivity gain when you have this tool available for your organization.

Mass Actions provide 3 functions (edit, update, and delete) for 4 main Salesforce objects: Account, Lead, Contact, Opportunity. Once installed, you need to configure to make the buttons available for your user in List View or in Related List page layout. Follow this guide Post Install Setup Instructions and User Guide to add buttons to List View. It depend on your business needs if you need to add all 3 buttons, or you can just add 1 button, e.g. Mass Edit only. Once button added to List View layout, you should see the buttons when open a View for that object.

The same buttons can be added to related list of a page layout, example: Contact related list in Account page.


Can I modify fields in Mass Edit?
Yes, create a new button, copy the original JavaScript and change the selectedFields. Remember to use this custom button instead of original custom button, follow this steps:
  1. Go to your object in setup, click the "Mass Edit" button and copy the JavaScript
  2. Create a new custom button call "Mass Edits", with Display Type = List and Behavior = Execute JavaScript 
  3. Paste the original JavaScript into the large box
  4. Update the line of code that says selectedFields (here is an example from Account: selectedObject=account&selectedFields=Name,OwnerId,ParentId,Phone,Website,Type,Industry,BillingStreet). Remove or replace any fields that you don't want to see with fields you do want to see.
  5. Add your new "Mass Edits" custom button to your list views (ignore the installed one)

Now you see the exact fields you want your users to mass edit.

Can I implement this in other object or custom object?
Yes, create a new button, copy the original JavaScript and change the selectedObject (and selectedFields for Mass Update).

Step 1. Get the JavaScript from installed buttons, e.g. to get JavaScript associated with “Mass Delete” button in Account object: Setup | Customize | Accounts | Buttons, Links, and Actions | double click “Mass Delete” => Copy the JavaScript

Step 2. Create new buttons for a custom object . (e.g my object is Country)
Setup | Create | Objects | click the custom object ( note down the API name of your object, e.g. mine is Country__c) | scroll down and look for  Buttons, Links, and Actions section | click “New Buttons or Links” | select Behavior “Execute JavaScript” => Then paste the JavaScript that you just copied.

Note: You need to make one modification to the script: find “Account” and replace all Account with the API name of your custom object, e.g. I replaced “Account” with my Object Name “Country__c")

Step 3: Assign the button to layout

Type: AppExchange (Managed Package)

Paid/Free: Free

Similar app: Mass Update And Mass Edit From List View by Salesforce Labs

Version: 1.3
Blog last updated: 26 Mar 2016

Wednesday, March 23, 2016

Popup Alerts

Ever wonder if you able to display a popup alert when your Salesforce user open an Account or Contacts, Leads, Opportunities, and Cases? Salesforce by default do not have this feature, but with Popup Alerts by Riptide, as Salesforce admin, you can install Popup Alerts package from AppExchange for free.

Once installed, there are 2 main items you need to take care:

1. Alert Message text field
This is a text area field with length 255 characters. Message in the popup alert will come from this field.

2. Popup Alert S-Control
Although S-Control has been deprecated, but you still can use it.

You just need to add Popup Alert S-Control into the object page layout, while the Alert Message field do not really need to be show in page layout (unless necessary), or you can set it as read-only, so only partial user able to edit it. You also can populate the message to display using workflow, process builder or apex code.

Type: AppExchange (Managed Package)

Paid/Free: Free

Publisher: Riptide Software


Version: 1.3
Blog last updated: 23 Mar 2016

Thursday, March 10, 2016

Linkclump for Salesforce user

If you are a Salesforce user that always open multiple tabs, this Chrome extension will help you. Although Linkclump is not really designed just for Salesforce usage, but it will help us in reducing click. Let's say you would like to open 5 Accounts from List View, usually you need to hover your mouse over each Account Name, right click, and select "Open link in new tab".

With Linkclump, this will activity will be much faster:
1. Place your mouse around the 1st or last account name to open
2. Right click mouse and hold it
3. Drag over all accounts you want to open (in new tab)
4. Release it

If you notice there is a number at top left (or right bottom depend on the direction you drag your mouse), this number tell you how many links you are going to open, see "7" at screenshot below.

Once release, it will open that 7 accounts in the new tab.

Type: Google Chrome extension

Paid/Free: Free



Version: 2.7.3
Blog last updated: 10 Mar 2016

Wednesday, March 9, 2016

Standard Tab Overrides

Sometimes back we blog about how to modify default View in Object Tab using visualforce page. There is another option to use a free app available from AppExchange called Standard Tab Overrides.

Because this app will override default Recent tab with a list view, we can configure to hide New button when user click object tab.

If you are not aware, there is a list view called Recently Viewed Object, so if your users prefer to get recent records they work with as in default tab, you can set the Id to Recently Viewed Object Id.

Limitation, this app only work with 7 standards object as below, so if you would to use for custom object tab, this is not the option:
✔ Leads
✔ Accounts
✔ Contacts
✔ Opportunities
✔ Cases
✔ Campaigns
✔ Contracts

In summary:
  • Override (7) standard object tabs with a default list view home page
  • Remove the "New" button from each tab and increase data accuracy
  • Set default tab list views for specific profiles or individual users

Here is the configuration guide Welcome to Standard Tab Overrides

Type: AppExchange (Managed Package)

Paid/Free: Free

Publisher: Software Anywhere


Version: 1.1
Blog last updated: 9 Mar 2016

Thursday, March 3, 2016

Grey Tab

This simple extension display two main things:

1. Displaying current Org Id, Salesforce instance, and active Session Id

2. If the page's URL contains param Id, or is the standard Salesforce record view page then the record details tab will show the raw data behind all fields user has field level security access to.
  • Current record Id
  • Object API Name and Object Label
  • User CRUD permissions
  • View all Field API Name, Field Label and Field Value for current record. 

Type: Google Chrome extension

Paid/Free: Free



Version: 1.9
Blog last updated: 3 Mar 2016