Pages

Sunday, January 26, 2014

Salesforce: Default Lead Conversion

In previous blog, we discuss about validation rule when user convert lead. Now, we have new requirement, can we set default values when user click Convert button in Lead?

By default there is no function  from Salesforce to set the default value, but there is a workaround for this, which is adding parameters to the URL. Here we go:

1. Create custom Convert button
Use this button instead of standard Convert button.
  • Go to Setup - Customize - LeadsButtons, Links, and Actions
  • Click New Button or Link
  • You can select Content Source = OnClick JavaScript

  • or Content Source = URL

  • Example: if you want default "Do not create a new opportunity upon conversion" is checked, add this formula in the formula field:
    • JavaScript: window.location.href="/lead/leadconvert.jsp?retURL={!Lead.Id}&id={!Lead.Id}&nooppti=1"
    • URL: /lead/leadconvert.jsp?retURL={!Lead.Id}&id={!Lead.Id}&nooppti=1

2. Edit Lead Page Layout
Remove standard Convert button and add new custom button created in Lead page layout, you can the button name  different.
  • Go to Setup - Customize - Leads - Page Layouts
  • Click Edit link for page layouts
  • Select Buttons in the layout
  • Drag and drop the button to add and remove 


Here list of parameters you can use in the custom button:
Convert Lead
  • "Do not create a new opportunity upon conversion" checked -- nooppti=1
  • "Send Email to Owner" checked -- sem=1
  • "Opportunity Name" -- noopptt={!Lead.Name} - opty
  • "Converted Status" -- cstatus=New Status
Task Information
  • "Subject" -- tsk5_fu=Mission Critical Task
  • "Status" -- tsk12_fu=Deferred
  • "Priority" -- tsk13_fu=High
Description Information
  • "Send Notification Email" -- email_followup=0
  • "Comments" -- tsk6_fu=No Comment
Reminder 
  • "Reminder" -- IsReminderSet_fu=0

You can check more fields you can pre-populate by default or if you have custom Task field to add, go to View Source by right click the page and look for name related to the field, example: <input  id="00N50000002DnFJ_fu" maxlength="200" name="00N50000002DnFJ_fu" size="20" type="text" /> For this example, the parameter would be 00N50000002DnFJ_fu=abc

Hope this help Salesforce admin.


Friday, January 24, 2014

Salesforce: Phone call from Smartphone

This blog is not related to Salesforce1 platform or mobile app promoted in Dreamforce '14. But, we have a use case, when user would like to call a number using smart phone or tablet when browsing from Salesforce.com website.

Here is the scenario, sales rep would like to call a Contact in Salesforce. Rather than to remember or copy the number to a paper, can the sales rep call directly from Salesforce webpage since he use his smart phone to browse Salesforce?

Phone field in Salesforce is not click-able, so by default, there is no way to call from Salesforce website. But, we have the workaround to use a formula field.

So, here we go:
  • Example to use standard Phone field in Contact object 
  • Create a formula field with return type = Text
  • Use this formula = HYPERLINK("Tel:" & Phone, Phone )
  • Add the formula field to Contact page layout, you may remove the default Phone field from page layout to avoid confusion
User will see this new field in page layout and it is click-able. Screenshot below taken from when user click the Phone formula field.




Wednesday, January 22, 2014

How to mass follow user or record in Chatter?

I blog about how to query records followed by users in Chatter last year. I get another requirement recently if it is possible to mass follow users to a record or user. YES, it is possible. We can use the same way as my previous blog above for this purpose.

Use Data Loader to create new records in the EntitySubscription object.

Only 2 fields you need to put in the CSV file:
1. ParentId : user / record to follow
2. SubscriberId: follower

You can use the same way to mass unfollow, this is the same with mass delete records in EntitySubscription object, but make sure you prepare the data correctly in CSV file, you just need to provide EntitySubscription Id.

Note: one user only can follow a maximum of 500 records (include users), see this document. But, you can request Salesforce support to increase this limit.

Reference:

Tuesday, January 21, 2014

Salesforce Pre-Release Registration

In every quarterly Salesforce release, 1-2 month before new release in selected sandbox instance, Salesforce will give chance to users to try Pre-release environment. User can signup from a form given, watch chatter group in Success - Release Readiness in Success Community. For Spring '14 release, here is the signup form.

The small issue here, it ask for email, but no username, as we aware that we can have different username and email address in normal Salesforce login. When you register with your existing email address, it will say "an account with this email address is already in use."

The simple solution is to create new email address in Gmail.com or Yahoo.com, but for many people (including me), it will be a bit troublesome to write that email address to remember it, although you can use tool like Evernote to remember it.

In Gmail, all characters anything after and including the "+" sign will be ignored.
Example - these are all the same:
johan@gmail.com
johan+test@gmail.com
johan+salesforce@gmail.com

All samples above will reach email johan@gmail.com (note this is just a sample, not my real email address).

So, we can make use of this for to register for Salesforce Pre-release, so register with johan+spring14@gmail.com will allow you to register without creating new email address :) 


Monday, January 20, 2014

Salesforce: View All Forecasts permission

This blog only applicable for Customizable Forecasting and not Collaborative Forecasts or Forecasts (Classic).

There are 3 permission related to Customizable Forecasting in Profile, they are located in General User Permissions.

Override Forecasts
Allows users to override their own forecasts and forecasts for users below them in the forecast hierarchy. All standard profiles except Read Only receive this permission.

Edit Personal Quota
Allows users to change their individual quotas. All standard profiles except Read Only receive this permission.
Users with the “Manage Users” permission can always edit any quota. Users can always edit the quotas of users that report directly to them.

View All Forecasts
Allows users to view any forecast regardless of their place in the forecast hierarchy. The System Administrator profile includes this permission.

As system admin, we need to make sure above permissions are given correctly. Otherwise, it may cause big issue.

Scenario: my user create a dynamic dashboard from Customizable Forecasting: Forecast Summary report type. When dashboard is viewing as a Country Manager, it suppose to show only forecast and closed amount from Sales Rep in the country based on Role hierarchy. But in this scenario, the Country Manager can see ALL Sales Rep from ALL country, which is not correct.

Solution: found it caused by the Country Manager profile have View All Forecasts permission granted.

A trace back, we give Country Manager profile this permission because there is a dashboard view as Region Manager and not as Forecast Manager. This user is assigned to the same profile but in the higher role hierarchy. After change the Forecast Manager to Region Manager and remove View All Forecasts, all working good.

Note: you can only have one Forecast Manager in a Forecasts Hierarchy. To setup Forecasts Hierarchy, go to: Setup - Customize - Forecasts (Customizable)- Forecasts Hierarchy

Key takeaway: Users with the “View All Forecasts” permission can see all forecast data of any user in your organization. It is recommended that you do not give this access to all users.


Reference:

Salesforce: How to edit Dated Exchange Rates ?

Salesforce support multi-currency by default, but you need to request Salesforce Support to activate it and inform them the default corporate currency to use.

Then, you can enable Dated Exchange Rate to define exchange rate for every period (month, quarter or year).

Note: dated exchange rates are not currently used in forecasting, currency fields in other objects, or currency fields in other types of reports (see this article). So, make sure you keep updating Conversion rate in-sync with Dated exchange rates. Otherwise, forecast report will report different value with opportunity report (for example).

Once you enter the dated exchange rates, you will not see edit link/button in Active Currencies page.



To edit the rate, click the Currency Name link, it will show history of the rate, then click Edit link to change the rate, or Del link to delete exchange rate for a period.



Another way is to update using API, look for object DatedConversionRate with field name ConversionRate. You can use Developer Workbench to update this easily. Query the object and choose update from Id.
SELECT Id, IsoCode, ConversionRate, StartDate, NextStartDate FROM DatedConversionRate ORDER BY NextStartDate DESC




Page-level ad