Pages

Friday, May 30, 2014

Salesforce: Freeze User for Major Deployment

Last year I blog about how to mass disable users login to Salesforce for major deployment using dummy profile. In Winter '14, Salesforce introduce user Freeze feature, which allow admin to block user login to Salesforce, but nothing change at the background, such as running user in dashboard run.

In case if user has left company, but for some reason he still able to get email, be aware that even user has been freeze in Salesforce, users will continue to receive automated system emails such as workflow and approval email alerts, scheduled reports, Chatter emails, and other system notifications from Salesforce. Here is an idea in ideaexchange to stop it.

Background: salesforce admin plan for major deployment over the weekend. Since now we have freeze feature, it can be easier using this to mass update user to freeze more easily using data loader, see this blog.

Before we freeze users for deployment, all user must be communicate well. Otherwise this will happen.

1. When user try to login to Salesforce, they will see the error message "Your login attempt has failed. The username or password may be incorrect, or your location or login time may be restricted. Please contact the administrator at your company for help."



2. User read error message above and tend to click 'Forgot your password ? link'

3. Even user is frozen, Salesforce allow user to change password.

4. User will found email from Salesforce and click link provided in the email.

5. User answer the security question and click Continue.

6. But it will bring user to the same error login again.

7. At this stage, we do not sure which password will work. The easiest is to Reset User password when admin has unfreeze the user.

Summary: we can use freeze for stop user login to Salesforce. But, since we cannot modify the error message in login screen when user is frozen, all users have to communicate well prior action, otherwise if they will do above steps. It will be disaster for admin to handle this and have to manually reset those users password.


Reference:


Monday, May 26, 2014

Salesforce Last Activity Date

Many of us may not aware if Salesforce have Last Activity Date. This field in not available in Page Layout, but available in Report, List View, and API (including Formula Field, Workflow and Validation Rule) for Account, Contact, Opportunity and Lead object.

It is important to note that Last Activity Date is not same with Last Modified Date. Last Modified  is the date and time stamp for changes (for example, changes to a phone number or an address) made to an individual record.  This also shows the user who made the change.

Last Activity shows when someone in your organization last did something related to the record. It represents one of the following:
  • The latest Due Date of the Completed Task on the related record
  • The latest Date of Event on the related record
Remember, it is NOT Created Date or Last Modified Date of the Event or Task.


How the Last Activity Date is Calculated?
Each activity record has different the who_id (Contact and Lead) and what_id (other objects) fields in Task / Event object. However, the value for the Account field is calculated by introspecting the who and the what, with the what taking precedence.
For example: when user log a call to a Contact, the Last Activity in Account will be updated.


Here are the rules:
  • If the What is an account, the account_id is that account.
  • If the What is an opportunity, the account_id is the account associated with that opportunity.
  • If the What is a contract, the account_id is the account associated with that contract.
  • If the What is a Custom object that is parented under an account, the account_id is the account associated with that custom object.



Salesforce Feed-Based Layout

In Spring ’14 release, Salesforce introduce Feed-Based layouts, page will split into 2 tab, where one for the record’s feed, and one for its details, including related lists.

Sample normal layout:

Sample feed-based layout:

You can mix normal layout with feed-based layout in the same object. You can check a layout whether is normal or feed based from Setup menu and go to object Page Layout, for example for Opportunity: Setup - Customize - OpportunitiesPage Layouts. Then see last column Feed-Based Layout is ticked.

Question: how to modify current normal page layout to new feed-based layout?
Unfortunately Salesforce not allow to modify it, so you have to 'Clone' existing layout from Create New Page Layout, then select a layout in Existing Page Layout, and tick Feed-Based Layout. Once the new page layout clone from old layout, you need to modify Page Layout Assignment to newly created layout. The same, you also will not able to modify feed-based layout to normal layout.

In feed based layout, you will see a new link called Feed View in page setup menu where you can configure Components and Filter Options.



Reference:


Determine User Record Access in Salesforce

In previous blog, I discuss about on how to restrict sharing access in Salesforce? This blog to discuss on how to check if user able to access to a record in Salesforce.



On top on that, here additional items to note:
  • Profile in step 1 include Permission Set
  • Before step 3, a check if user have permissions to View All record for that object defined in Profile or Permission Set
  • Account owner will able to access any Contact and Opportunity owned by other user
  • Owner of parent record in Master-Detail able to access all child records
  • User in Account Team, Case Team and Opportunity Team able to access the record

Reference:

Sunday, May 25, 2014

Salesforce Release and Sandbox

Every year Salesforce have 3 major releases, marked with Spring, Summer and Winter release. It start from Spring, Summer and Winter follow by the year number. But, for Winter release, the year used will be the coming year, example: Winter '14 is release on Oct '13, some users may confuse with this, but that is how it named.

Here is the production release date for last 2 releases (now in Spring '14 release) and schedule date for coming release:
  • Winter '14 : 04 Oct - 12 Oct '13
  • Spring '14 : 04 Apr - 18 Apr '14
  • Summer '14 : 11 Jul - 19 Jul '14

Follow Trust
Check Salesforce schedule maintenance & major release schedule to see plan down time
https://trust.salesforce.com/trust/maintenance

Bookmark/save Salesforce release date
Advise to follow Salesforce blog http://blogs.salesforce.com and Success - Release Readiness community to get latest update on the new release and features.

Sign up for a Pre-Release org 
Usually 2 month before Production release date, users can sign up for Pre-Release instance if would like to try before Sandbox release. If you select not Developer Edition, Pre-Release instance is only good for 60 days, after that will be wipe out.
Example: for Summer '14 Pre-Release sign-up page
https://www.salesforce.com/form/signup/prerelease-summer14.jsp

Understand Sandbox Preview Window
Some sandboxes will be automatically included in Preview to new release and some are not. It depends on your sandbox instance. But, even your sandbox is not in the preview list, it will be upgraded to latest release on the last week of production release, so you cannot request your production / sandbox instance always stay at the old release.

If your sandbox instance is listed for Preview:
  • if you want your sandbox upgrade to new release, no action needed
  • if you want to stay in current release, you need to refresh the sandbox after a given date 
If your sandbox instance NOT listed for Preview:
  • if you want your sandbox upgrade to new release, you need to refresh your sandbox by a given date
  • if you want to stay in current release, no action needed.

Sample of Sandbox Preview Instructions for Summer '14 release
http://blogs.salesforce.com/company/2014/04/summer-14-sandbox-preview-instructions.html

If your sandbox is part of Preview window and you use new features introduce on that release, while production still not in the new release. It will cause issue if you deploy the new features to Production, advise to check to the release notes if you have any new features used, because you will not able to deploy that features to your Production instance.

Managing Sandbox
For both full or developer sandbox, set a plan date to refresh your sandbox. Some organization set for monthly or quarterly depend on the business and requirements. Always refresh sandbox when you have major deployment or project within Salesforce platform.

Create a post refresh run-list, example:
  • Data Masking
  • User/Profile modification
  • Turn off schedule jobs
  • Manage outbound email 
  • Manage outbound message
  • Validation rule and workflows
  • Etc

Best Time for Major Deployment
  • Not during preview window
  • Let major deployment stable for a few weeks

Saturday, May 17, 2014

Salesforce available Icon and Logo

As Salesforce admin, we often try to impress our users or boss with pretty icon / image within Salesforce detail page, in a list view, or even in report.

Use case: use image to easily show how importance a customer for company based on closed won opportunity. We can easily create a formula field in Account with Return Type = Text, example:

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"), 
IMAGE("/img/samples/stars_100.gif","1") 



)

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

If you notice image in the formula field above is not pointing to image hosted in some website, but it is within Salesforce itself. This is because Salesforce provide icons available for us to use.



If you need more icons and not available in above list, you can install Graphics Pack app from AppExchange, it is free from Salesforce Labs. Once installed, you will get hundreds of icons available to use, but the image path would be different.
You can open list of image from Graphics Pack Overview tab, select a category, hover the image and right click "Open image in new tab" from your web browser to get image path, example: /resource/1400195872000/GraphicsPack/16/famfamfam/silk/accept.png



Other resources with logo or icons provided by Salesforce:


Reference:


Sunday, May 11, 2014

DupeCatcher for clean Salesforce data without duplication

Clean data is one of the most important aspects to have your Salesforce CRM working perfectly, this is included data quality and no duplication. For data quality, you can set required field, mandatory field in page layout, validation rule until apex trigger code. However, to prevent duplication, it will be troublesome to build your own code/configuration.

There are many tools available in AppExchange to prevent data duplication in Salesforce, whether created by Salesforce lab or external party, some of them are free or paid.

In this blog, I would like to introduce DupeCatcher. DupeCatcher is a real time duplicate lead, contact and account blocker. It can provide duplicate warning records and associate tasks with them. It is a product by Symphonic Source, which is also creator of a popular data deduplication tool called Cloudingo.

 A few items I would like to note for DupeCatcher:
  • It is FREE!!!
  • It is Native (runs on the Salesforce platform, ensuring availability, performance, and data security)
  • It is a No Limit app (do not count against the limits of your Salesforce organization)
  • It is simple, you just need a few clicks to setup
  • It works for Lead, Account and Contact
  • It works for real time data entry, but does NOT deduplicate on mass import and deduplicate records already in Salesforce
  • It is NOT case-sensitive. 
Once you have install DupeCatcher from AppExchange, you will find a new app in your Salesforce.




Step-by-Step to configure this app:
  1. Click DupeCatcher app as in screenshot above
  2. Click DupeCatcher Filters tab
  3. Click New button
  4. Enter Filter Name; select an object; select if action only insert, or update or both; enter error message; and few more options.
  5. You can hover your mouse over yellow question mark icon for help text
  6. Click Save button
  7. Scroll down to DupeCatcher Filter Rules filter to create matching rules, you can have up to 12 rules. If you have more than 1 rule, the relation between each rules are always AND. If you need to have OR relation, you need create new DupeCather Filter for each scenarios.
When you choose Action = Do Not Insert or Do Not Update, this option will block user not able to save data when duplicate data detected based on active Filters.



If you select Action = Report Duplicate, this option will not block user when user enter duplicate data, but it will create alerts. You can notice in  Filter Metrics section, how many duplicate records (see Potential Duplicate Count) in how many set of data (see Duplicate Alert Count, data will be shown in DupeCatcher Duplicate Alerts related list).



You can click Alert record to see Potential Duplicate data:



For more information, go to DupeCatcher website, see this FAQ and watch this video in Youtube.

Saturday, May 10, 2014

Salesforce: Create HTML email template

Using Salesforce.com, you can define your own email template. There are a few type of email template in Salesforce: Text, HTML (using Letterhead), Custom (without using Letterhead) and Visualforce.

HTML (using Letterhead) provide easy way to create email template, where you need to build a letterhead prior. You can edit background colour, logo, header colour, body colour, footer and etc. But, you have limited flexibility to modify email template using this option.

Custom (without using Letterhead) give you more flexibility to design your own email template, but you need to have technical knowledge with HTML. You can use HTML editor such as: CoffeeCup or online HTML editor, such as: quackit to help.

But, if you have Ms Word and familiar with Ms Word, you can utilize it. Type and beautify your content in Ms Word with font style and etc.
- Save it as Web Page, Filtered (*.htm;*.html)
- Open the html file save using any text editor, example: Notepad
- Copy the whole HTML and paste it to HTML Body in Salesforce email template
- Done.

If you have images for email template, you can reference upload the images to any site as long as reachable from internet, or upload them into Salesforce Document, make sure to set the images as Externally Available, then copy and paste image URL for your email template.

In summary:
1. Upload images to Document and set as Externally Available, right click the image, if you are using Google Chrome, click "Open image in new tab"

2. Create Email Template
Go to Setup - Administer - Communication Templates - Email Templates
select Custom (without using Letterhead)
Copy and paste HTML prepared, example:
<table>
<tr>
<td colspan=3>
<img src="https://c.na3.content.force.com/servlet/servlet.ImageServer?id=015300000000tX5&oid=00D300000000SHq" alt="Logo" height="42" width="82"/></td>
</tr>
<tr>
<td>Name </td>
<td>{!Contact.FirstName}</td>
<td><b>{!Contact.LastName}</b></td>
</tr>
</table>

If you notice in markup above, it refer to image stored in Salesforce document in line 4, while merge field in line 8 and 9 for Contact First Name and Last Name.

Once saved, you can preview in HTML Preview panel and test send email from Send Test and Verify Merge Fields button.


Sunday, May 4, 2014

How to implement SSO in Salesforce1 mobile app?

For organization has implement SSO to login to Salesforce from web browser, organization can implement the same for Salesforce1 mobile app. There are two option for this:

1. Log in to a custom domain 
From log in screen, tap Log in to a custom domain

Enter your company 'My Domain' used for SSO.


App will prompt you to enter your company network (e.g. Active Directory) username and password.

You will be asked to allow permission access to Salesforce1 for iOS or Android

2. Add new Connection
From log in screen, tap gear icon at top right

Tap + icon on top right corner

Enter your SSO URL (e.g. mycompany.my.salesforce.com) into Host and your company name (preferred) into Label, then app will ask your company network username & password, in the next screen permission to allow login using Salesforce1, this is the same with option 1 above.


The difference between "Log in to a custom domain" with "Add Connection", with add connection, you just need to add once and and keep using it, while login with custom domain, need you to type "my domain" every time you login. It is your choice since both works, but prefer to add connection once and you do not need to enter my domain every time you log out from the app.





Thursday, May 1, 2014

Why Salesforce assignment rule is not working ?

After involve and active in Salesforce Success Answers Community for many years, I see many user confused and question on why my assignment rule is not working?

In previous blog, I discuss on assign using active assignment rule and how to set it default in page layout.

Here a few steps to troubleshoot:

1. Check the assignment rule is Active
Only one assignment rule can be active at one time in both Case and Lead.

2. Try to create the record manually in Salesforce web user interface
Check if the record is assigned to the correct user / queue and make sure checkbox Assign using active assignment rule is selected.

To support step 2, things you can do:
- Enable History Tracking
- Add object History in page layout (Case History or Lead History)

If assignment rule is working, you should see in history related list:

And compare with if Lead owner is manually change:

Can you see the difference?

3. Assignment Rules work only for specific scenario
  • Lead Assignment Rules — Specify how leads are assigned to users or queues as they are created manually, captured from the web, or imported via the lead import wizards.
  • Case Assignment Rules — Determine how cases are assigned to users or put into queues as they are created manually, using Web-to-Case, Email-to-Case, On-Demand Email-to-Case, the Self-Service portal, the Customer Portal, Outlook, or Lotus Notes.

Using Import Wizard
Select assignment rule in Step 1, even the assignment rule is not active, you can select it and it will work.


Using Data Loader
In Settings menu, enter Assignment Rule Id into Assignment rule check box, remember not Assignment Rule Name. You can retrieve the Id from Salesforce URL when you open the assignment rule, example: https://na3.salesforce.com/setup/own/entityruledetail.jsp?id=01Q50000000Iiz4&setupid=LeadRules



If you use other API tool that not provide Assignment Rule setting,  Lead / Case created simply will not have assignment rule kick-in.

If you are using API or APEX code, you can retrieve the Assignment Rule Id and use it when create Lead or Case, here a simple snippet:

//Fetching the assignment rules on case
AssignmentRule AR = new AssignmentRule();
AR = [SELECT Id FROM AssignmentRule WHERE SobjectType = 'Case' AND Active = True LIMIT 1];

//Creating the DMLOptions for "Assign using active assignment rules" checkbox
Database.DMLOptions dmlOpts = new Database.DMLOptions();
dmlOpts.assignmentRuleHeader.assignmentRuleId= AR.id;

Case newCase = new Case(Status = 'New') ;
//Setting the DMLOption on Case instance
newCase.setOptions(dmlOpts);
insert newCase ;


TIPS: Salesforce processes rules in the following order:
  1. Validation rules
  2. Assignment rules
  3. Auto-response rules
  4. Workflow rules (with immediate actions)
  5. Escalation rules


Reference: