Pages

Monday, October 21, 2013

Salesforce: How to find Custom Report Type usage

User permissions needed:
* To create or update custom report types - “Manage Custom Report Types”
* To delete custom report types - “Modify All Data”

Out of the box, Salesforce provide many standard reports and standard report types, for some users, it may be sufficient, but for some cases, admin need to create new custom report type.

A report type defines the set of records and fields available to a report based on the relationships between a primary object and its related objects. Reports display only records that meet the criteria defined in the report type.

For example, an administrator can create a report type that shows only job applications that have an associated resume; applications without resumes won't show up in reports using that type. An administrator can also show records that may have related records—for example, applications with or without resumes. In this case, all applications, whether or not they have resumes, are available to reports using that type.

You can create custom report types from which users can report on your organization's reports and dashboards. When defining a custom report type, select Reports or Dashboards from the Primary Object drop-down list on the New Custom Report Type page.

But, how about deleting a report type? Yes, this is possible for user with “Modify All Data” permission (usually system admin).

You need to aware that deleting a custom report type will 
- Permanently delete the Custom Report Type (no Recycle Bin)
- Delete any reports based on the Custom Report Type (no Recycle Bin)
- Invalidate any dashboard components based on the deleted reports

So... you really need to be careful and it is always good to find out which reports are created using report type that will be deleted?

How to find those reports? Create a new report type with Primary Object = Reports
I am not going to explain how to create report type, but you can see below screenshots:


Remember, you always can remove or rename fields to show in a custom report type from "Fields Available for Reports" section.

Next, create new report using report type above to find out which reports are created using particular report type.



Sunday, October 13, 2013

Cannot send email from Salesforce Sandbox

If you just create new sandbox or refresh a sandbox Sandbox, you will not able to send email: manually, from workflow or from apex code. This is because since Spring '13 release, Salesforce has change email deliverability to System email only.

You can change the email deliverability to All email from Setup > Email Administration > Deliverability.










If system administrator have not change email deliverability, user will not see Send an Email button in Contact, Lead or Case related list, although it is has added to the object related list page layout.

From Workflow or Auto-Response Rules, email will not send out and there is no notification.
From apex code, you will found this error "Email Privileges Revoked", see this blog.

You can check Email Logs to audit all email send from and to Salesforce, email logs accessible from Setup > Logs > Email Log Files.

Friday, October 4, 2013

Salesforce: Default Fields in report

When create a new report in Salesforce, Salesforce will automatically put some fields into new report. We cannot customize the default fields when report created.

However, for custom report type, system administrator able to customize it. Here we go:

1. Create New Report Type
  • Setup - Create - Report Types
  • Select Primary Object, enter Label, Description, Category and select Deployment status
  • If you need to relate to other object, select from "click to relate another object"
  • Save



2. Edit Fields for Reports
From "Fields Available for Reports" section, click "Edit Layout" button.
  • Drag and drop fields from available fields (in right panel) to left layout to add field to be available in report builder, or drag and drop fields from page layout to right panel to remove it.
  • You can add lookup field by click link "Add fields related via lookup »", example: you are in Opportunity object, and want to add Account Address field
  • You can "Create New Section" in page layout, section created will be shown in different tree in the report builder
  • Click Edit Properties button to make the field show by default when user create new report in report builder, but before that you have to select fields (you can select multiple fields by hold Ctrl button). A window will be popup and you may change the field name will be Display As other label in report builder.
  • You can drag and drop section row up and down (if you have more than 1 section), this will effect to field tree position in report builder.
  • Save


Compare to the screenshot below for the layout in report builder:

Read here for more information.

Wednesday, October 2, 2013

Salesforce: Permission to edit User Quota

Background: Super user need to enter all Sales Rep quota for every quarter. As system admin, we can enter it manually in user detail page (if not too many sales rep), or using Data Loader if you have a lot of users need to update (see this blog). But, would it be nice if Sales Ops (read: Super User) able to manage Sales Rep quota by themselves?

Here is the solution, use Delegated Administration
Go to Setup - Security Controls - Delegated Administration
Create New button and enter a name for delegated group.

You can leave option to Login Access disable for security concern.
From here, select user allowed to update quota in Delegated Administrators
Then enter Sales Rep role in to be managed in User Administration
Done - you can left Assignable Profiles and Custom Object Administration as they are not used for this scenario.

To note, enabling delegated administration will give user ability to:
  • Creating and editing users and resetting passwords for users in specified roles and all subordinate roles, including setting quotas, creating default opportunity teams, and creating personal groups for those users. But, if you not add any Assignable Profiles, user cannot select any profile, and since profile is a mandatory field in user creation, user actually cannot create user, got it?
  • Unlocking users
  • Assigning users to specified profiles, this is again depend on Assignable Profiles given.
  • Logging in as a user who has granted login access to their administrator, this is depend if  Login Access enable for particular delegated group.
  • Managing custom objects created by an administrator, depend on object given in Custom Object Administration.

For more information, read this doc.



Tuesday, October 1, 2013

Salesforce: Convert Lead with Campaign Influence & Primary Campaign Source


In previous blog, we discussed about Primary Campaign Source in Opportunity relation with Campaign. In this blog, we are going to discuss from Lead conversion and relationship to Campaign and Opportunity.

Here is the scenario:
1. Create a new Lead

2. From Campaign History in Lead Related List, add GC Campaign, then add DM Campaign with both Status = Sent.

3. Edit GC Campaign Status to Responded

4. Convert Lead: create new Account, Contact and Opportunity

5. In Campaign, Lead change to Contact for both Campaign Members related list.

6. In Account, Contact added in Contacts related list, Opportunity added in Opportunities related list.

7. In Contact, both campaigns added into Campaign History related list, with Status and Responded bring over from Lead.

8. In Opportunity, campaign added in Campaign Influence related list with Contact Name, Primary Campaign Source = DM Campaign, this is because DM Campaign is latest campaign attached to the Lead, although it is not responded.

9. In DM Campaign, Opportunity created added in the Opportunities related list.

10. If user change Primary Campaign Source in Opportunity page layout from DC Campaign to GC Campaign, Opportunities in Campaign related list move to GC Campaign as well.


Campaign Influence
System Administrator can configure Campaign Influence from Setup - Customize - Campaigns - Campaign Influence, such that only Campaign within the last 120 days (see Specify Campaign Influence Time Frame) with rule Responded = True will be associated to Opportunities as Campaign Influence.


Primary Campaign Source
Primary Campaign Source in Opportunity is automatically refer to the last associated campaign on a lead prior to lead conversion OR the last associated campaign on a contact (if the contact was manually added to SFDC without being converted from a lead). See Member First Associated field in Campaign History related list in Contact or Lead.

screenshot from Contact / Lead

Opportunity maybe influenced by more than one campaign, if you enable Campaign Influence and the campaign fit into Time Frame and Rules, when you convert Lead, all Campaigns related to the Lead will be created as Campaign Influences in the Opportunity related list.

You also allowed to manually associate more influential campaigns to an opportunity, but only one campaign will be marked as Primary Campaign Source. Campaign manually added into Opportunity will not add back into Opportunity related list in Campaign. You can view influential campaigns from the Campaign Influence related list on the Opportunity detail page.

screenshot from Opportunity

Primary Campaign Source field at opportunity detail page designate the most influential campaign for that opportunity based on the data in Campaign Influence related list.


ReferenceWhat is Campaign Influence?


Page-level ad