On top of Chatter activity statistics and influence rank report in earlier blog (introduce in Winter 13 release). We also can run a report on usage of public hashtag (#) topics. Public hashtag topics are those used on profiles and in public groups. For privacy reasons, hashtag topic usage reports DO NOT include hashtags used on records or in private groups.
To create this report, you need to create new Custom Report and choose the Hashtag Definitions as primary object. You can select from the following fields:
• Created Date — Date the hashtag topic was created
• Hashtag Text — Text following the hashtag (#)
• Hashtag Count — Number of times the hashtag is used
• Normalized Hashtag Text — Text following the hashtag (#), without capitalization and punctuation
While for Chatter Activity report as in earlier blog, you can find following fields:
• Comment Count — Number of comments made by the parent
• Comment Received Count — Number of comments received by the parent
• Influence Raw Rank — Number indicating the parent’s influence rank, which is calculated based on the parent’s Chatteractivity statistics, relative to the other users in the organization
• Like Received Count — Number of likes received by the parent
• Parent — User name
• Post Count — Number of posts made by the parent
Pages
Friday, April 26, 2013
Chatter Usage and Activity Report
For organisation using Chatter, you may need and interested to know how Chatter usage in your company.
1. Chatter Usage Dashboards
This is free app from AppExchange, you can install from this link
From this dashboard you can see:
- top 10 most popular users
- top 10 most popular groups
- number of chatter groups (private vs public)
- total User feed & group feed
- top users post to group
- etc
2. Chatter Activity and Influence report
Create custom report type
Click on Setup - Create - Report Types - New Custom Report Type and choose "Chatter Activity" object. Give it a name "Chatter Activity and Influence" and store it in the folder of your choice. You can then go to the Reports Tab and find the report type you just created and click on Create.
Thursday, April 25, 2013
Salesforce "Email Privileges Revoked" error message
When you write apex code in Salesforce to send email in Sandbox instance, you may find error "Email Privileges Revoked" error message.
You may never see this error earlier. What is the caused?
As per Spring'13, Salesforce have added a way for you to control the type of email your organization sends, with the new Access level setting in Setup > Administration Setup > Email Administration > Deliverability.
While you typically won’t change this setting day-to-day, these options can be useful when you need to temporarily suspend outbound email or when you’re working with sandboxes, for example:
You may not be able to edit the Access level if salesforce.com has restricted your organization’s ability to change this setting.
Summary: by change access level to "All email", it should solve the issue in Sandbox.
You may never see this error earlier. What is the caused?
As per Spring'13, Salesforce have added a way for you to control the type of email your organization sends, with the new Access level setting in Setup > Administration Setup > Email Administration > Deliverability.
While you typically won’t change this setting day-to-day, these options can be useful when you need to temporarily suspend outbound email or when you’re working with sandboxes, for example:
- No access: Prevents all outbound email to and from users.
- System email only: Allows only automatically generated emails, such as new user and password reset emails.
- All email: Allows all types of outbound email. Default for new, non-sandbox organizations.
- Newly created sandboxes default to System email only.
- Sandboxes created before ’Spring 13 default to All email.
You may not be able to edit the Access level if salesforce.com has restricted your organization’s ability to change this setting.
Summary: by change access level to "All email", it should solve the issue in Sandbox.
Wednesday, April 24, 2013
Improve Salesforce report performance
Salesforce.com report is a simple, yet very powerful feature. Out-of-the-box, it come with multiple type of reports, and admin can create more custom report type as needed. With report builder introduce few years back, it even easier to use and more user friendly.
But, sometimes you may found that report take sometimes to load, or time-out (although this is very rare happened).
What is the caused?
1. Too many columns in report
Just add columns as needed. More columns to display will take more time to run report. You also can hide details, when it needed, just click "Show Details" button.
2. Too many records
Set report filter criteria correctly and efficiently, you can add multiple criterias and time frame.
3. Inefficient filters
Contain and Does Not Contain take longer time to load report.
Report using AND will load faster than OR.
If you have tune everything above and it still slow, you can schedule report for future run and email it to you daily or weekly.
For more information, watch this YouTube video.
Tuesday, April 23, 2013
Salesforce: Calculate age for weekdays and weekends
In Salesforce, it is easy to calculate the number of days between 2 dates. Just create a formula field, for example: End_Date__c - Start_Date__c for date fields, or Datevalue(End_Date__c) - Datevalue(Start_Date__c) for datetime fields and DONE!!!
But, is it possible to find out the number of days - only weekdays and only weekends between 2 dates?
Hmmm.... most of us will think about Apex Trigger. Yes, it is the correct solution, apex trigger is able to calculate without issue, but if you are not a developer, you need a developer for this.
Wait a minute.... Can we 'just' use a formula field to calculate weekdays and weekends?
YES, it is possible with complex formulas. Here we go:
To calculate the number of Weekday
IF ((CASE(MOD( Request_Date__c - DATE(1900,1,1),7),
0, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,3,3,4,4,5,5,5,6,5,1),
1, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,3,3,4,4,4,5,4,6,5,1),
2, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,3,3,3,4,3,5,4,6,5,1),
3, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,2,3,2,4,3,5,4,6,5,1),
4, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,1,2,1,3,2,4,3,5,4,6,5,1),
5, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,0,2,1,3,2,4,3,5,4,6,5,0),
6, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,1,2,2,3,3,4,4,5,5,6,5,0),
999)
+ (FLOOR(( Execution_Date__c - Request_Date__c )/7)*5)
- 1) < 0,
0,
CASE(MOD( Request_Date__c - DATE(1900,1,1),7),
0, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,3,3,4,4,5,5,5,6,5,1),
1, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,3,3,4,4,4,5,4,6,5,1),
2, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,3,3,3,4,3,5,4,6,5,1),
3, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,2,2,2,3,2,4,3,5,4,6,5,1),
4, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,1,2,1,3,2,4,3,5,4,6,5,1),
5, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,0,2,1,3,2,4,3,5,4,6,5,0),
6, CASE( MOD( Execution_Date__c - Request_Date__c ,7),1,1,2,2,3,3,4,4,5,5,6,5,0),
999)
+ (FLOOR(( Execution_Date__c - Request_Date__c )/7)*5)
- 1)
To calculate number of Weekend
CASE(MOD( Request_Date__c - DATE(1900,1,1),7),
0, CASE( MOD( Execution_Date__c - Request_Date__c, 7),1,0,2,0,3,0,4,0,5,1,6,2,0),1, CASE( MOD( Execution_Date__c - Request_Date__c, 7),0,0,1,0,2,0,3,0,4,0,5,2,2),
2, CASE( MOD( Execution_Date__c - Request_Date__c, 7),0,0,1,0,2,0,3,1,2),
3, CASE( MOD( Execution_Date__c - Request_Date__c, 7),0,0,1,0,2,1,2),
4, CASE( MOD( Execution_Date__c - Request_Date__c, 7),0,0,1,1,2),
5, CASE( MOD( Execution_Date__c - Request_Date__c, 7),0,1,2),
6, CASE( MOD( Execution_Date__c - Request_Date__c, 7),6,2,1),
999)
+ (FLOOR(( Execution_Date__c - Request_Date__c )/7)*2)
Example:
Request Date = 1 Jan 2014
Execution Date = 10 Jan 2014
Total days on weekdays = 7
Total days on the weekend = 2
Request Date = 1 Mar 2014
Execution Date = 10 Mar 2014
Total days on weekdays = 5
Total days on the weekend = 4
If you see in the formula above, we have DATE(1900,1,1); this is referred to as 1-Jan-1900 is Monday. So, you can use any date which is Monday, for example, 1-Jan-2007
Another request is to calculate a date after X days from today (business day means weekday from Mon - Fri). Here is the formula; the result will be a formula in Date format, while Days__c is a number.
CASE(
MOD(TODAY()- DATE(1900,1,7),7),
0, (TODAY()) + Days__c+ FLOOR((Days__c-1)/5)*2,
1, (TODAY()) + Days__c+ FLOOR((Days__c)/5)*2,
2, (TODAY()) + Days__c+ FLOOR((Days__c+1)/5)*2,
3, (TODAY()) + Days__c+ FLOOR((Days__c+2)/5)*2,
4, (TODAY()) + Days__c+ FLOOR((Days__c+3)/5)*2,
5, (TODAY()) + Days__c+ CEILING((Days__c)/5)*2,
6, (TODAY()) - IF(Days__c > 0,1,0) + Days__c + CEILING((Days__c)/5)*2, NULL)
Result sample: today is 3 Oct 2016, and Days are 5, so the result would be 10 Oct 2016.
Monday, April 22, 2013
How to restrict sharing access in Salesforce?
We often heard that business would like to restrict x number of users to access Account, while open it to rest of users. How we can do that in Salesforce?
However in Salesforce, it is the other way round. You need to specify who can access an object, NOT about who cannot access an object.
If your company decide not to give access to anyone in company (to view or edit an object), Organization-Wide Defaults (OWD) should be set to Private, then add sharing rule for that object based on: Criterias, Public Groups, Roles or 'Roles and Subordinates'.
If OWD is set to Private or Public Read-Only. It will be shared in following rule:
- Role Hierarchy, any user in higher role hierarchy of record owner will be able to access the record
- Sharing Rule, any user and user in higher role hierarchy of users being shared in Sharing Rule will be able to access the record
- Manual Sharing, owner or user in higher role hierarchy of record owner, will be able to share records owned.
To investigate who can access a record, system admin can click on 'Sharing' button in record detail. Then, click 'Expand List' to get more details on user being shared and why they being shared.
Subscribe to:
Posts (Atom)





