Pages

Tuesday, September 10, 2013

Using Salesforce joined report for User target

Background: 
Business would like to have a report in Salesforce to list number of opportunities owned by a sales rep, include information of number of closed won opportunity with target of number of report for each sales rep.

Solution:
Create a joined reports.

Steps:
1. Create a custom field with number type in User object

2. Create custom report type with Primary Object = Opportunity

3. In the report type, add custom field created to the Custom Report Type from Add fields related via lookup » then Select Opportunity Owner >> and fields needed.


4. Create a new report using new report type created
Select joined report, add report blocks, set filter and date range for each block then and add fields needed. You also can Add Formula and Cross Block Formula as needed for the report.




Improve Salesforce Report Performance (2)

In previous blog, we discussed about how to improve Salesforce report performance, a report may running slow or timeout because of:
  • It is querying too many objects
  • It is dealing with intricate lookups
  • It has too many fields

Here are few more items you can look into to improve Salesforce report performance:
  • If you can’t view a report and want to edit it to avoid the time out, you can append ?edit=1 to the end of report URL to get to edit mode, where you can adjust the criteria. 
  • When filtering, use the equals or not equal to operators instead of contains or does not contain. 
  • Use time frame filters to narrow your report’s date range if possible. For example, use Last 30 Days instead of Current FY.

To determine the improved performance, it's a trial and error process.  Each user might have different report performance results as it also depends on many factors such as their role.

If the report results in a time out error message, then your system administrator can ask Salesforce Support to possibly "Index" a report filter on the database tables.  This does not always resolve the issue as the above solution is the best method.

If your reports sometimes get time out error and sometimes is running well, this may cause by caching mechanism applied by Salesforce backend. After implement all suggestion above, if still get the same issue, you can log a ticket to Salesforce for the best advise.

Monday, September 9, 2013

Salesforce: Merge Account button

Out of the box, Salesforce have merge account function. User can merge 2 or more Accounts into Account, where user can select values from each account for each field to survive.

To launch Merge Accounts, just click Account tab and scroll down to Merge Accounts in Tools panel.

But, do we have Merge button in Account page layout? Out of the box, NO, but we can create custom Merge button without have to write any code. Here we go:

1. Go to Account object, click Buttons, Links, and Actions
2. Click New Button or Link button
3. Enter label, name, description
4. Behavior = Display in existing window without sidebar or header
5. Content Source = URL
6. Button or Link URL = /merge/accmergewizard.jsp?srch={!Account.Name}



After button created, you need to add the button into Account Page Layout.

This button exactly use the same function from Merge Accounts tool, we just add button to make user easier to merge Accounts from Account detail, so nothing fancy.


Salesforce: Status = In Development

When standard Report Type is not enough, you can create Custom Report Type to define 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. To create Custom Report Type, navigate to Setup | Create | Report Types and click New Custom Report Type.

The same when you create custom object from Setup | Create | Object, you need to choose Deployment status: In Deployment or Deployed.

Custom Report Type

Custom Object


Deployed - select this option when you're ready to let all users access the report type or object.

In Development - select this option if you want to test it before making it available to all your users, the report type or object will be hidden from all users except those with “Customize Application”user permission and user with “Manage Custom Report Types” permission for custom report type. Only users with those permission able to create and run reports using report types or related to that custom object.


Reference:  Create a Custom Report Type



Tuesday, September 3, 2013

Salesforce: Filter Search Results

Global Search is an awesome feature of Salesforce, you can search everything in your Salesforce org, from Account, Contact, User (People) until Chatter. You also can use Options to search only "Limit to items I own" and "Exact phrase".

But, one thing that many user do not know that we also can filter search result. How?
By default, you will not see Filter in the search result. Your Salesforce admin need to set specified fields to use as filter.

Example for Account, go to Setup - Customize - Accounts - Search Layouts. Then look for 'Search Filter Fields' and click Edit link. Admin can select fields want to show as Filter in the search result.



Screenshot below show, user can filter on Account, but not on Contact. This is because admin has set fields for Account Search Filter, but not for Contact.



Once you click Show Filters link, you can enter any search criteria.



Note: if you leave the field blank, it will not use as search criteria.

The criteria you specify are AND based. That is, if you specify more than one criteria, the result includes only records that match all of the criteria. For example, if you enter 'acme california' in the Account Name filter field, your results include account with contain both acme and california. So 'acme california' and 'california acme' will return the same result.

For date field, such as Created Date, you can enter literal date values such as YESTERDAY or NEXT MONTH.


Reference: How Do I Refine Search Results?


Last update: 8 May 2016


Salesforce: How to show more records in related list?

When viewing a record detail page (e.g. Account detail) the related lists shows a limited number of related records at a time, e.g. for Opportunity related list. So, if you have more than 5 (by default) opportunities tagged to an account, in the Account detail page, you will see You will see Show x more » | Go to list (y+) ». By default x will be 5 and y is total number of the records.

You can scroll down to the bottom of page, and look for Always show me more records per related list or Always show me fewer / more records per related list if you have click more before (even in previous login).

Clicking more or fewer increases and decreases the default number of related list records displayed for all object record detail pages for the logged in user. If you notice, when you click more or fewer link, in the URL, salesforce will add parameters rowsperlist=xx, for example: https://cs30.salesforce.com/0018000000Ril4o?rowsperlist=10, this parameter will show related list up to 10 records for ALL related list.

Please note: this change will be permanent for the logged in user for ALL tab.

How is this different from the "Show more" link on the a related list?
The more / fewer link at the bottom of a record detail page is not the same as the Show more link on the bottom of individual related list sections on the record detail page. The "Show more" link increases the number of records displayed for that related list only (not all related lists on the page) for one time only.

If the user views another record and returns to the previous record, they will have to click the "Show more" link again in order to increase the number of related list records for the related list they wish to view.

Page-level ad