Pages

Tuesday, April 29, 2014

Push Notifications in Salesforce1 Mobile App

If you aware in Spring '14, admins can now provide more detail within the notifications including the text of a post or comment in Chatter, a Chatter group’s name, or a task description. Salesforce1 notifications let users know when certain events occur in Salesforce, such as when they receive approval requests or are mentioned.

Two types of notifications can appear to Salesforce1 users:

1. Push notifications are alerts that appear on your mobile device when you're not using the Salesforce1 downloadable app. Push notifications are not supported in the Salesforce1 mobile browser app. These alerts can consist of text, icons, and sounds, depending on your device type. You can choose whether to receive push notifications; however, you can't enable push notifications if they were disabled by your administrator.


2. In-app notifications keep users aware of relevant activity while they’re using Salesforce1. Users can access their 20 most recent notifications by tapping the Notification icon.


Any time that you @mention somebody in the Chatter feed they will receive both a push notification and notification within Salesforce1 app.



All you need to do to start using these notification is navigate from Setup, click Setup > Mobile Administration > Notifications > Settings, and then select both Enable in-app notifications and Enable push notification. And that’s it!



Some notifications include text that your users enter in Salesforce. To ensure that sensitive information isn’t distributed through a third-party service, by default, push notifications to iOS devices include the user’s name only.
For example, an in-app notification might be “Allison Wheeler mentioned you: @John Smith, can you update the Acme account with their new shipping address?” The equivalent push notification for iOS devices would be “Allison Wheeler mentioned you.”

To control this, go to Setup > Mobile Administration > Notifications > Settings and Include full content in push notifications.
Screenshot below show when "Include full content in push notifications" is disable and in phone setup fo Notification Centre is set to Alert.



If you enable Include full content in push notifications,it will show some of the message in push notification. Screenshot below taken when phone is locked and "Show on Lock Screen" enabled.



Reference:



Friday, April 25, 2014

Salesforce: Enabling Chatter Annoucement

In Spring '14 release, Salesforce introduce Announcement for Chatter Group.


If you do not see Announcement action in Chatter Group, check following items:

1. Enable Publisher Actions 
Setup | Customize | Chatter | Settings, make sure Enable Publisher Actions is enabled.

2. Add Announcement in Group Layouts
Setup | Customize | Chatter | Groups | Group Layouts
Click override the global publisher layout link, you should see Announcement there and you can move it to the left if needed. You can revert to the global publisher layout by click arrow icon at far right in Publisher Actions.


In this setup menu, you can create new Group Page Layout and assign it to different user profiles.

Only following users can post and delete group announcements:
  • Group owners, or
  • Group managers, or
  • Users with the “Modify All Data” permission


Reference:
Post Announcements in Chatter Groups


Thursday, April 24, 2014

Salesforce: Add button in Opportunity Team & Account Team

Background: A marketing user needs to be added to Opportunity Team, so the user can be added to Opportunity Split.

Issue: Add button is not visible in the Opportunity Team related list for a user.

Finding: The Marketing user able to read Opportunity based on a sharing rule configured in Opportunity or Manual Sharing. But the user Role hierarchy is not above Sales who owned Opportunity.

Based on Salesforce documentation Adding Members to an Opportunity Team, the user needs to have permission:
- Read access on users and opportunities
- Owner of the Opportunity record, or above owner in your organization's role hierarchy

Solution:
Sales or Sales Manager or Sales Ops to add Marketing user to Opportunity Team, there is no way to make Add button visible in Opportunity Team for Marketing to add themselves because they are not above Opportunity owner in the role hierarchy.


Few facts about the Account Team:
  1. To add users to Account Team, the user needs to have "Read/Write" access to the Account. A user with Read-Only access will see Add button, but will not able to add users into the Account Team.
  2. Adding Opportunity access in Account Team will NOT add the user to Opportunity Team.
  3. Users with "Read/Write" access on the Account, but not above Account Owner in the role hierarchy, will be able to add users to Account Team, but NOT to edit and delete users from Account Team (just add). Those users can't select the level of access for the new team member, see screenshot below
  4. If the user role hierarchy is above the Account owner, users able to add, edit and delete the Account Team. When they add/edit users, they will see options of access level.
for point (3) Lightning

for point (3) Classic


for point (4) Lightning

for point (4) Classic


Few facts about the Opportunity Team:
  1. Add button in Opportunity Team will only visible for the Opportunity Owner or user above Opportunity Owner in the role hierarchy, including users with Modify All opportunity permission, but not for the user with Read/Write access to Opportunity.
  2. Adding users to Opportunity Split will automatically add the users to Opportunity Team members.

Last update: 2 Jul 2017

Tuesday, April 22, 2014

Salesforce: No option to send email to Users when scheduling a Report or Dashboard

Do you aware when you enable Folder Sharing (this feature introduce in Summer '13 release), you will notice when you schedule a report for future run, you not see Roles, Roles and Subordinates and Users option anymore. See screenshot below:

Compare to before enabling folder sharing:


So in this case, you will not able to add individual users to receive email for the report. Even, the report folder is accessible by All Internal Users.

Salesforce aware of this issue, it is captured as know issue with plan to fix on Summer '14 release.

The workaround:
Add individual users need to receive email of schedule report to the report Folder Sharing, see this screenshot:



This issue and workaround is exactly the same for Schedule Dashboard Refresh, add user into Dashboard Folder share.


Reference: No available Groups, Roles or Users to select when scheduling a Report


Thursday, April 10, 2014

What Happens when You Delete Accounts in Salesforce

User permission to delete Account : “Delete” on account object.

Most accounts and their associated records can be deleted in one click - but some accounts can’t be deleted until associations have been removed. This is not related from where you delete the Account: page layout, apex code, API, etc.

Deleted accounts are moved to the Recycle Bin, along with these associated items.
  • Contacts
  • Opportunities (if they're not Closed Won)
  • Contracts (if they're not activated)
  • Activities
  • Notes
  • Attachments
  • Portal roles and groups (if all portal users in the account are disabled.)
  • Partner relationships
  • Relationship group members

If you restore an account from the Recycle Bin, any related items are also restored except for:
  • Relationship group members in some cases. 
  • Portal roles and groups. 

You can’t delete an account if:
  • You don’t have the “Delete” permission on accounts
  • You aren’t the account’s owner, above the account’s owner in the organization role hierarchy; or an administrator
  • The account is enabled as a partner account; it has associated cases, activated contracts, or related opportunities that are owned by other users; or it has associated contacts that are enabled for the Self-Service portal.

If you attempt to delete an account that has closed/won opportunities owned by you, a message displays asking you whether you want to delete the closed/won opportunities along with the account or to cancel the account deletion.

Sunday, April 6, 2014

Salesforce: Selective Mass Close Case

This is continuation from blog Mass Close Case. Using out of the blog feature, user can close all Case selected, but how if user only allowed to close Case only with selected criteria?

You need to create new custom button using JavaScript (although this is also possible using Visualforce page with Apex code). Here we go:

Create custom button 
  1. Go to Setup | Customize | Cases | Search Layouts |  Buttons, Links, and Actions
  2. Click 'New Button or Link' button
  3. Select Display Type = List Button, and check Display Checkboxes (for Multi-Record Selection)
  4. Copy and paste script below:
 {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}   
   
 var selectedCases = {!GETRECORDIDS($ObjectType.Case)};   
 if(selectedCases.length > 0){   
    var idList = "(";   
    for(var j=0; j<selectedCases.length; j++)   
    idList += "'" + selectedCases[j] + "',";   
    idList = idList.substring(0, idList.length - 1) + ")";   
   
    var searchResult = sforce.connection.query( "SELECT Id " +   
                                     "FROM Case " +   
                                     "WHERE " +   
                                     "( " +   
                                     "Status != 'New' AND " +   
                                     "Id IN " + idList +   
                                     " )"   
                                  );   
   
    if(searchResult.getInt("size") > 0){   
       var varCases = searchResult.getArray("records");   
       var varCasesToUpdate = [];   
       for(var i=0; i<varCases.length; i++){   
          var updatedCase = new sforce.SObject("Case");   
          updatedCase.Id = varCases[i].Id;   
          updatedCase.Status = 'Closed';   
          varCasesToUpdate.push(updatedCase);   
       }   
   
       var updateResult = sforce.connection.update(varCasesToUpdate);   
       location.reload();   
    }   
    else{   
       alert("Selected Case(s) are all Closed!");   
    }   
 }   
 else{   
    alert("Please select at-least one case." );   
 }  


Add button created to Cases List View
  1. Go to Setup | Customize | Cases | Search Layouts |  Cases List View
  2. Click Edit link
  3. Select button in Custom Buttons
  4. Done and Save

Based on the solution above, you can use the same technique for other object with different criteria but similar purpose.


Saturday, April 5, 2014

Salesforce: Mass Close Case

In previous blog, we blog about how to close Case in one click. But how to mass close case? Salesforce by default have mass Close Case function, but many of Salesforce users or admins not aware of this function.

It is located in Case List View. So, you can create a List View based on criteria's fit your requirement and mass close case there by select case you or your user want to close them. Here is the step:

Create a List View in Case
Close button should be visible by default.

If for some reason you not see the button in List View, go to Setup | Customize | Cases | Search Layouts |  Cases List View and click Edit link.



Make sure Close [MassClose] is checked.


So, when user click Close button in case list view, a new window will be open for the new Status, Case Reason and Internal Comments (not mandatory), but I do not see if possible to customize this mass Close Case screen.


Friday, April 4, 2014

Salesforce: Report Last Run

In the Salesforce report, you can check when the last time a report runs by using a report with report type = Reports

Add field call Last Run to the report, done!

Few notes on the Last Run date time:
  • When the user opens a report, it will automatically consider as a run, so the Last Run will be updated
  • When a scheduled report is run, it also considers as a run and the Last Run is updated
  • When scheduling a dashboard, the report behind used for the dashboard component, the report is also considered as run and Last Run is updated
  • User cannot delete a report used by as source for the dashboard component
You see in the screenshot below, report line 2 and 3 is used by a dashboard and schedule for refresh, so the Last Run is the same

When the user clicks to open report line 2, Last Run is updated


Reference:



Page-level ad