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 not Visible

Background: Marketing user need to be added into Opportunity Team for particular Opportunity, so they can be added to Opportunity Split.

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

Finding: Marketing user able to read opportunity based on Sharing rule configured in Opportunity or Manual Sharing. But their role hierarchy is not above Sales who owned Opportunity.

Based on Salesforce documentation Adding Members to an Opportunity Team, user need to have permission:
- Read access on users and opportunities
- Owner of 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 role hierarchy.


Few facts for Account Team:
  1. To add user into Account Team, user need to have "Read/Write" access to the Account. User with Read-Only access will able to see the button, but will not able to add user into Account Team.
  2. User with "Read/Write" access to the Account (not above Account owner in role hierarchy) will NOT able to delete user from Account Team (just add)
  3. Adding Opportunity Access in Account Team will NOT add user in Opportunity Team.

Few facts for Opportunity Team:
  1. Add button in Opportunity Team will only visible for the opportunity owner or user above opportunity owner in role hierarchy.
  2. To add user into Opportunity Split, user have to be Opportunity Team member.

Reference:


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 Salesforce report, you can check when the last time the report run. Create a report with report type = Reports

Add field call Last Run to the report, done!

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

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


Reference: