Pages

Sunday, July 26, 2015

Why Salesforce admins must attend Dreamforce ?


Dreamforce 2015 
San Francisco – 15-18 Sep 2015

In less than two months, Dreamforce 2015 is coming in beautiful city of San Francisco, a Salesforce annual event where salesforce customers, partners, developers come and participate to learn upcoming features and sharing knowledge. 

It is biggest cloud computing event attend by more than 135,000 attendees from all over the world (number from Dreamforce 2014). Dreamforce offers golden opportunity to learn from Industry visionaries, product experts and world leaders who will highlight the areas where the industry is heading to. It provides opportunities to hear from knowledgeable speakers about upcoming features, best practices, third party products, and more.



Reason why Salesforce admins must attend Dreamforce:

1. Learning & Ask the Expert
Opportunity to attend Ask the Experts area in the Admin Zone. There is serious learning happening every year in Dreamforce and walk away with more knowledge from system and process perspective than before.

2. Community & Networking
Learn best practice and share with other administrators from around the world on how they manage their Salesforce.

3. Content & Ideas
Acquire a ton of great content and new ideas to improve our business / system. Discover what is valuable for your organization.

4. Keynotes and Roadmap
Watch keynotes present by Salesforce top management on the new products, including features and roadmap for every product: Sales Cloud, Service Cloud, Chatter, Platform, Marketing Cloud, Analytics and Platform.

5. Sessions & Live Demos
More than 100 sessions designed to make administrators more successful. These 40-minute sessions will be on topics including analytics, declaratives, mobile, multi-org functionality, the sandbox, and data—for all levels of admin—and more advanced sessions than ever before.

6. Hands-on-Training
Free hands-on-training sessions.  More than 40 unique sessions with repeats scheduled based on popularity. The mix of one hour and 2.5 hour sessions will be scheduled throughout all four days and will include content for all clouds and all roles.

7. Certifications
Demand for Salesforce experts is growing rapidly and companies are looking for proven professionals to help drive success. Getting certified boosts your career. Take the exam at Dreamforce for discounted exam price.

8. Partner Expo
Hundreds Salesforce partners showcasing thousands of solutions. It is the best way to understand Salesforce products and solutions from Salesforce and partners. See live demos and meet face to face with more than 400 partners.


Action item: register now to get discount on registration fee.


Reference:

Saturday, July 25, 2015

Salesforce: Mass Delete Records for Custom Object

Mass delete records in Salesforce should be an easy job for experience Salesforce admin. Sometimes you need to delete all data after performing sanity test, integration test, and stress test in Production for deployment of new functionalities, which may include create new records in new custom objects.

In standard record such as: Lead, Account, Contact, Case admin can easy mass delete records by navigate to the object tab, and click the Mass Delete object link below the Tools heading. The same can be achieve by navigate to Setup | Data Management | Mass Delete Records. While, this functionality is not exist for custom object.

It would be just a few clicks in Data Loader to extract the record Id, then use the record Id from data extracted to delete the whole record. But, if we are working with hundred thousands or millions of records, it will take you hours to extract the Id and mass delete the records.

For custom object, Salesforce have Truncate function to perform this activity in few clicks and very fast. This action will permanently remove all data, but all the fields and rules are not touched.

If you do not see Truncate button in the custom object, check SetupCustomize | User Interface | Enable Custom Object Truncate


  1. From Setup, click Create | Objects.
  2. Click an object name to go to the object’s detail page and click Truncate.
  3. In the Confirm Custom Object Truncate window, review the warning and then enter the object name of the object to truncate in the text box provided.
  4. Click Truncate.

Records deleted is not send to Recycle Bin, but Salesforce will create a new object end with _trunc. This object appears in the Deleted Objects list for 15 days, and contain all fields and records deleted from the original object, so this would be like a temporary backup.


Notes related to Truncate object
  • Truncating a custom object permanently removes all of its records
  • You can’t recover the records from the Recycle Bin
  • A copy of the truncated object appears in the Deleted Objects list for 15 days—during this period the object and its records continue to count toward your organization’s limits—and then the copied object and its records are permanently deleted.
  • You cannot truncate object with one or more child objects as containing data, this include Master-Detail and Lookup relationship.

Behind the screen : when you do object truncate:
  • Salesforce will delete existing object and create new object with the same structure
  • If you have auto-number field, the number will be continue from truncated object

Restore the object : when you restore the deleted objects, some attributes of deleted custom objects are not automatically restored and you need to restore these manually:
  • The custom object was set to In Development mode. Only users with the “Customize Application” permission can see the object tab, search results, related lists, and report data types.
  • Recreate a custom tab and any list views for the object.
  • Rebuild any workflow rules on the object.
  • Reactivate any custom validation rules for the object.
  • Reactivate any approval processes for the object.
  • Open and save any custom formula fields on the custom object to enable them.
  • Rebuild and reactivate any matching rules or duplicate rules for the object.
  • On the page layouts of other objects, add the custom object related list, button, or link to any page layouts that have been edited while the object is deleted. 
  • Related lists, buttons, or links to this object are automatically restored if the page layout is not edited while the object is deleted.
  • For custom report types where the object is not the main object, add the reference to the custom object back to the custom report types. Existing field will not point the parent object, but just as a text field.
  • Reports based on the custom report type are automatically restored If not edited while the object is deleted. 
  • Recreate any reports that have been edited.
  • It may take several hours before you can search for records in the object.

You can’t truncate standard objects or custom objects that:
  • Are referenced by another object through a lookup field or that are on the master side of a master-detail relationship
  • Are referenced in a reporting snapshot
  • Have a custom index or an external ID
  • Have activated skinny tables
  • When your organization has reached its limit of the allowed number of custom objects.



Reference:


Monday, July 20, 2015

Salesforce: Sharing Button URL

We have discussed the Sharing button sometimes back in our blog Salesforce Sharing Button. The sharing button in Salesforce gives users the ability to grant access to other users more permissions to specific records.

But, on top of just giving additional access to other users, there is also a button called Expand List, which will show all users who have access to the record; Salesforce admin can use this functionality to trace record sharing access level and the reasons when need to support.

But, for some companies, users are not allowed to manually share record accessibility, so the admin or consultant who implemented Salesforce will take this button away; this will also cause the admin cannot use not this button to trace record sharing easily.

Options available:
  • Create a new page layout for admin with the Sharing button - this is not really nice as you need to maintain another page layout just for the sake of this need.
  • Manually add and remove the button when needed; this is easier, but if you have proper Change Management, this will cause issues as you do not have good reason to keep updating the page layout.

URL

Actually, when you click that button, salesforce will bring you to a URL. So, manually typing the URL parameters will give you the same functionality as clicking the Share button. 

Account
https://ap1.salesforce.com/p/share/AccSharingDetail?parentId=00190000007Gyno

Opportunity
https://ap1.salesforce.com/p/share/OppSharingDetail?parentId=0069000000aXoxH

Contact - not applicable for Controlled by Parent sharing setting
https://ap1.salesforce.com/p/share/ConSharingDetail?parentId=0039000000C26VC

Lead
https://ap1.salesforce.com/p/share/LeadSharingDetail?parentId=00Q90000003UQDa

Case
https://ap1.salesforce.com/p/share/CaseSharingDetail?parentId=5009000001vQyjk

Custom Object
https://ap1.salesforce.com/p/share/CustomObjectSharingDetail?parentId=a0J900000005pWa

Just change the instance name to your instance name, use the correct parameter based on the object, and put it in the Record Id; you will get the same result as clicking the Sharing button.

In Lightning

Lightning has a different URL, but you still can use the above URL to see the sharing.

Sharing Hierarchy
This is similar to the "Expand List" button in Classic. Use the "View" link to get a similar function to "Why" in Classic. 
https://domain.lightning.force.com/lightning/r/Opportunity/0062H00001JPFSHQA5/recordShareHierarchy

Share
From here, you can add sharing to a user, group, role, etc. Click the "Edit" link to see all the current shares for the record, then click "View Sharing Hierarchy" to get the above result.
https://domain.lightning.force.com/lightning/r/Opportunity/0062H00001JPFSHQA5/recordShare?backgroundContext=%2Flightning%2Fr%2FOpportunity%2F0062H00001JPFSHQA5%2Fview



Sharing from Role Hierarchy

Contact, Opportunity, and Case are special objects where we can set the Account owner's ability to view or edit  Contact, Opportunity, and Case that are related to the Account. This is configured in the role hierarchy of the Account Owner.


How does this translate when we use the above links with parameters to see access reason?


This is an opportunity, owned not by the Account Owner; the opportunity access in role hierarchy for the Account owner = Users in this role can view all opportunities associated with accounts that they own, regardless of who owns the opportunities.


This is the same opportunity as above, but opportunity access changed Users in this role can edit all opportunities associated with accounts that they own, regardless of who owns the opportunities.


The same access reason for Contact and Case too, with Reason for Access = Account Sharing.




Friday, July 17, 2015

Salesforce: How to block user to access Data Loader or Workbench?

In some companies, permission to Export Report is not allowed, one of the concern is about data security issue. However, some "smart" user will try to find other ways to download data using external tool, such as: Data Loader or Workbench.

For admin, this tools would be useful in supporting daily work in Salesforce.com, but not all users should allowed to access it.

API Enabled
One of the easiest way is just disable API Enabled in the user permission. But, API Enabled is not just use for Data Loader, but some other applications such as: Salesforce for Outlook, Salesforce1 mobile app also need that permission, so disabling that permission is not correct.

Connected Apps
We have discussed Connected Apps in blog How to enable Salesforce1 access by Profile / User? The same method can be used to block other apps. Under SetupManage AppsConnected Apps, you will found apps that connect to your Salesforce organization. For app that is not allowed for everyone, click the app name and change Permitted Users from All users may self-authorize to Admin approved users are pre-authorized



While for users allowed to access those app, go to User Profile (or using Permission Set), look for Connected App Access section, and check the apps.



For users not granted to access the app, they will see following error:

Data Loader: Sorry, your administrator has blocked access to this client



Workbench: user is not admin approved to access this app



The user login history when login with unauthorized app - Failed: Not approved for access




ReferenceWhy am I getting the error "Sorry, your adminstrator has blocked access to this client" when logging in with Apex Data Loader?



Salesforce: Approval Process - Reminder for Approver

In earlier blog, we discussed who can approve on Approval Process? Once user submit a record for approval, approver will receive email to approve or reject, this email is based on email template in Approval Assignment Email Template, but by leave this email template blank, Salesforce will use 'default' template.

But, the approver may missed that email, so the request never been approved or rejected. User also cannot re-submit for approval, by default Submit for Approval button is removed by system after submit for approval.

To track all pending approval requests, admin can run and schedule a standard report called All Pending Approval Requests report, but this will be additional work for admin to manually follow-up on this. Go to Reports tab - Administrative Reports folder - All Pending Approval Requests report.



Solution: create Workflow with Time-Dependent action for Email Alert.
With Time-Dependent Workflow Actions, we can define multiple email alerts for different timing to send alert to approver prior approval / rejection.

Step by step::
1. On the object, add 3 new custom fields to track the approval process:
a) Submit for Approval Date Time - Date/Time field
b) Submit for Approval - Boolean field (default False)
c) Approved - Boolean field (default False)

2. On Approval Process
At Initial Submission Actions, add 2 new Field Update actions to update:
a) Field update: Submit for Approval Date Time = NOW()
b) Field update: Submit for Approval = True

At Final Rejection Actions and Recall Actions, add 1 new Field Update action to update:
c) Field update: Submit for Approval = False
we can leave Submit for Approval Date Time field, so understand the records has been (or when the last) submitted for approval, but rejected/recalled.

At Final Approval Actions, add 1 new Field Update action to update:
d) Field update: Approved = True

3. Create new Workflow with Time-Dependent action:
a) Rule Criteria: Submit for Approval = True AND Approved = False
b) Add Email Alert actions, depend on how many alerts required, as Time-Dependent Workflow Actions
c) Remember to Activate the Workflow.


Issue: the recipient in email alerts (point 3b above).
The recipient in this case would be the approver. Assume the approver is the record owner's manager.
Looking at available recipient type in email alert, there is no option for Owner's Manager.
Vote for this idea: Use 'Owners' Manager for workflow purposes



Here a few options for the workaround:

1. Create a custom Lookup field to User object, this field will show in Related User in the recipient type. You need to have apex trigger to populate owner's manager to this field, but if you are not the #DeveloperHero, use option (2 and 3) below.

2. Similar with option (1) above, create a custom Lookup field to User object, this field will show in Related User in the recipient type. But, instead of using apex trigger to populate owner's manager, you can use Process Builder with action Update Records.



3. Create a custom Email field, this field will be shown in Email Field in the recipient type. You can populate owner's manager email address by using Field Update action, Formula Value = Owner.Manager.EmailThe Field Update action can be added into Approval Process at Initial Submission Actions.


Limitation: if the original approver (Owner's Manager) re-assign the approval process to someone else as Approver, above workflow for reminder will keep send email alert to the original Approver, which is the Owner's Manager.


ReferenceApproval Process With Reminder after submission




Tuesday, July 14, 2015

Salesforce: Approval Process - Who can approve ?

To build an approval workflow in Salesforce is simple, since Salesforce provide Approval Processes. You can find this under Setup - CreateWorkflow & ApprovalsApproval Processes.

In early blogs, we have discussed about Serial and Parallel Approval in Salesforce, in this blog, we would like to discuss in depth option of users can approve?

Manager Approval
In the approval process Step 3. Specify Approver Field and Record Editability Properties, there is option to determine next automated approver.

Notice that Next Automated Approver Determined By is not a mandatory field here.

Option available here:
  • Manager - a standard field in user object and has no relation with Role Hierarchy
  • All custom fields in user object with type = Hierarchy - in above sample: Boss and Sales Director.

If you select Manager as in above screenshot, when you set up Approval Step, in Step 3. Select Assigned Approver you will have option to select Automatically assign using the user field selected earlier. (Manager).


Once this approval step saved, if you go back to approval process Step 3. Specify Approver Field and Record Editability PropertiesNext Automated Approver Determined By become mandatory field.


Change the user field here will auto change Assigned Approver in Approval Steps.


Which Manager?
In Approval process Step 6. Specify Initial Submitters, admin can define who can submit for approval. We have option for the submitter: Record Owner, Record Creator, Public Groups, Role, Role and Subordinates, or specific User. This mean the Manager who approve could be Record Owner's Manager or Submitter's Manager.


How we configure this in Salesforce?

1. Submitter's Manager
This is default option, in approval process Step 3. Specify Approver Field and Record Editability Properties, just select Manager.


2. Record Owner's Manager
If we need the one who approve is not submitter's manager, which valid in many use case, you need go to approval process Step 3. Specify Approver Field and Record Editability Properties, just select Manager, also check Use Approver Field of Opportunity Owner.


Once save, we can confirm in the Approval Process.



Who else can approve?
In approval step - Step 3. Select Assigned Approver you will have option to automatically assign to approver(s)


  • User  --> a specific user to define
  • Queue --> only for object support Queue, such as: Case, Lead and custom object
  • Related User --> in this list, we have Record Owner, Record Creator, User who last modify the record, Lookup field to User in the object (example in Opportunity) - this is not related to custom field in User object.

For information on When multiple approvers are selected, check out this blog.



Page-level ad