Rakesh Gupta’s Salesforce Newsletter of the Week – 19th April 2014

Posted on

Articles that you may like

1)  Visual Workflow (Flow) tips and tricks
2) Embed Report Charts in Visualforce Pages
3) 5 Reasons to Attend a Salesforce1 Developer Week

Salesforce as a SSO provider  

Learn how simple it is to configure Salesforce Identity as a Single Sign-on provider to third party applications. In this video we’ll quickly setup Salesforce as an Identity Provider for Google Apps.

Sell from Anywhere with the Salesforce1 Sales Cloud

Today’s customer companies grow faster with a customer platform that connects their sales teams with their customers, so they can sell from anywhere. Learn how the most successful companies are growing revenue and redefining the future of sales.

Tip #1 – Territory Management Can Now Be Disabled

After Spring’14 release, Organizations that use Territory Management can disable the feature if necessary. To Disable this feature for your organization contact Salesforce.com customer support.

Note:- If you disable Territory Management, your users lose record access that’s based on territory assignments,
your organization no longer has access to territory management data, and Customizable Forecasting is automatically
disabled.

Tip #2 – Chatter Expert Message Disabled

After Spring’14 release,  the initial Chatter Expert message is no longer displayed.

Chatter Expert
Chatter Expert

The default message explaining how to use private messaging is no longer displayed to new users and users who have never used private messages. This does not prevent administrators from using Chatter Expert  to post messages to their organization.

Salesforce.com Summer’14 Sandbox Preview Instructions

The Sandbox Preview window for Summer ‘14 is scheduled to start on the June 6, 2014. If you would like your Sandbox organization to take part in the Summer ‘14 Preview, your Sandbox must be active on a preview instance by June 6, 2014 to take part in an overall instance upgrade. Gaining early access to Summer ‘14 is a great way to test out new features and settings before the GA release and upgrade of your production org. It’s also important to be aware of the sandbox preview window should you wish to retain the current release in your sandbox org (to effectively opt-out of the preview)

Preview Windows Refresh Schedule

Use the graphic below to assist in understanding and planning around the preview window refresh schedule. For example, if your Sandbox is on CS3 and you refresh it after 12 AM PST on May 31, 20140, it will be moved to a non-preview Instance.

Understanding the Preview Window Schedule
Understanding the Preview Window Schedule

Note:- To learn more about Salesforce.com Summer ‘14 Sandbox Preview Instructions click on the link.

5 Reasons to Attend a Salesforce1 Developer Week

Posted on Updated on

Salesforce1 Developer Week

As you all are aware that Salesforce launches a new platform and apps called as Salesforce1 in Dreamforce’13. To understand the power of Salesforce1 and how to start with it. It’s highly recommended to attend a Salesforce1 developer week in your local user group. You can find the full list by visiting the URL . Salesforce1 Developer week will be start from 27th April 2014. In this article I will discuss few things why it’s recommended to attend such type of meetup

Extend your network

Social Networking
Social Networking

 

At your local developer user group Meetup, there is no shame in networking in person and online. These sessions helps you to interact with your local Salesforce techies.You can learn about how other organization is using Salesforce1 and lot’s more. It will boost your knowledge and increase your network circle. You can find experts following the #Salesforce1 tags on Twitter.

 

Learning things that you can put into action immediately

You can also learn from your peers from their experience. To see some of the amazing examples rolled out during the session will fill you with incredible ideas for how you can improve business by using Salesforce1 and become a Salesforce hero. This session will give you brief idea about Salesforce1 platform and how you can development on it. start with You can also get Salesforce1 goodies and books.

Meet members of the Salesforce Evangelism team

salesforce evangelist
salesforce Sassy

As you all are aware that  maximum of user group have Special Guest to guide you, to start with Salesforce1. For Navi-Mumbai Salesforce Developer User Group this time we have Raja Rao DV from Salesforce Developer Evangelists team as Special Guest.

Sociable

Salesforce Developer groups meetup are informal, fun and friendly and a good chance for a chat over a drink.

 It’s FREE!

These Meetups are free. You can register to your local user group Salesfore1 Developer Meetup. That means:  free access to the session,  free drinks, free foods.

You never know what connections you will make to boost your success in 2014!

Embed Report Charts in Visualforce Pages

Posted on

Embed Report

Reports and dashboards display how you performed in the past and what’s happening at the moment. They are important to driving success and implementation of any CRM project. The information provided by reports and dashboards is especially important in today’s arena, where it’s critical to be proactive, rather than reactive, in your approach. You want to be able to spot trends and act on them immediately.

Business Use case :- Higher management in Universal Container wants to use “Opportunity trends” report chart on a Visualforce Page.

Solution of above business requirement

After Sprin’14 release, you can use  report Report Chart (That is created by using the report builder) in any Visualforce page, with only a single line of code. Report Chart can include dynamic filters, auto-refresh based on expiration time, and many other options. With this enhancement, all of your most critical Chart and analytics is in the background, wherever you are working. You no longer need workarounds such as iframes or Javascript to create a Visualforce page with dashboard-like functionality. You can just pull the chart into your Visualforce component by its report ID.  Follow the below instruction to complete this requirement

  • Create a Report with Chart . If you don’t to how to do that please go through my article Embedding Charts Anywhere
  • Copy the report ID, you can get a report’s ID from the report URL in Salesforce, or request it through the API.
  • Now create a Visualforce page and use Visualforce tag <analytics:reportChart> with attribute reportID

Code:-

 <apex:page >
<analytics:reportChart reportId=”00Ox0000000i8gv” size=”small”></analytics:reportChart>
</apex:page>

  • It will look like below screenshot
Embed Report Charts in Visualforce Pages
Embed Report Charts in Visualforce Pages

You can find more details about <analytics:reportChart> tag by visiting the URL.

Few points to remember

  1. By default chart’s size is set to Medium. If you to change the size use size attribute and values you can use are Tiny, Small, Medium, Large, Huge.
  2. The length of time that an embedded chart can cache data is 24 hours.

 

Visual Workflow (Flow) tips and tricks

Posted on Updated on

tips

In the last few articles I have gone through various ways to use Visual Workflow in Salesforce. In this article I will discuss few concepts related to Visual Workflow, that is mentioned below

  1. Validation rule in Visual Workflow
  2. Branding – How to use Image in Visual Workflow
  3. Improve Visual Workflow UI

–> Validation rule in Visual Workflow

Business Use case :- Universal container is creating a Child Donation Screen by using Visual Workflow, Screen contains Name (Text), Phone Number (Text) and Amount (Currency) fields. They want to write a validation rule  on Name so user can’t enter any word other than alphabets. For Phone Number field they want a way so the user can’t able to enter more than 10 digits.

Solution of above business requirement

You can use standard Salesforce formula syntax in two places within a flow:

  1. In a Formula resource
  2. In a Screen element, specifically to validate user input for a field

We have to create a new flow.  To develop this functionality follow the below instructions

  • Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
  • Click on New Flow, it will open flow canvas for you
  • Drag and drop a Screen ( Give the name Donation Registration) on window, and click on Add a Field ( Use Text Data type field, Give the name Name ) to enter Donor Full Name and make this field require by selecting Required check-box
  • Navigate to Input Validation section and select Validate Check-box, and write validation rules on rectangular box, as shown in below screenshot
Step 1 - Create Write Validation Rule Formula
Step 1 – Write Validation Rule Formula

Formula I used :- REGEX( Name, “[a-zA-Z ]*$”)

  • Now navigate to Error Message section and write the message you want to display when the formula statement evaluates to False, You can take help from below screenshot
Step 2 - Write Error Message
Step 2 – Write Error Message
  • You can also use Rich text editor to define error message in a different  font, size and color.
  • Likewise you can create Phone Number (Text) field and write validation rule, you can take help from below screen shot
Validation Rule for Phone Number Field
Validation Rule for Phone Number Field

Formula I used :- ISNUMBER (Phone_Number ) && LEN (Phone_Number ) < 11

  • Create Amount (Currency) and make this field require by selecting Required check-box.

Note:- If the formula statement evaluates to True, the input is valid. If the formula statement evaluates to False, the error message is displayed to the user.

Few points to remember

  • If flow contains an invalid formula, then You can’t activate that flow.
  • The formula expression must return a Boolean value.
  • If the user leaves the field blank, and the field is not required, no validation is performed.
  • A formula in a flow can’t contain more than 3,000 characters
  • Formulas in flows don’t support the below mentioned functions. Using these functions results in your formula returning Null (GETRECORDIDS, IMAGE, INCLUDE, INCLUDES, ISCHANGED, ISNEW, ISPICKVAL, PARENTGROUPVAL, PREVGROUPVAL, PRIORVALUE, REQUIRE SCRIPT, VLOOKUP)

–> Branding – How to use Image in Visual Workflow

Business Use case :-  Higher management in Universal container wants to user their company logo on Child Donation screen for branding purpose.

Solution of above business requirement

The Rich text editor on the screen element currently does not support Image src tags. However, the flow run-time interprets any text as HTML. So, you could store the HTML markup in a custom setting, database record or some variable,  and use that on the screen. In our current approach I am going to store Image src tags on a variable. First you upload image on static resources in Salesforce, now you have the image link, follow the below instruction to complete this process

  • Navigate to Resource tab, and create a variable with name ImageURL, Select data type as Text and under Default Value define an image tag as shown in the below screenshot
To store Image Tag
To store Image Tag

Image tag that I used :-  <img src=”https://ap1.salesforce.com/resource/1397649887000/Logo&#8221; width=”10%” height=”60 >

  • Now go back to your Screen and click on Add a Field ( Navigate to OUTPUT section and use Display Text,  Give the name CompanyLogo )
  • Use Variable ImageURL where you stored Image src tags, you can take help from below screen shot
Use Image on Visual Work Flow
Use Image on Visual Work Flow

Save this Flow and Activate it.

–> Improve Visual Workflow UI

If you are using Visual Workflow on Visualforce Page then you can change following things

  1. buttonLocation :- You can define location of navigation buttons in the flow user interface. Available values are Top, Bottom and Both.
  2. buttonStyle :- You can define style to the flow navigation as a set. Can only be used for inline styling, not for CSS classes
  3. FlowText :- You can define A field label.
  4. FlowCurrency :- You can define A field label.

Note:- To learn more about “Customizing a Flow’s User Interface” click on the URL.

Now create a Visualforce Page and embed your Flow. To change the  label of Text field (Name (Text), Phone Number (Text)) defines one CSS class and use it in Visualforce page

<style type=”text/css”>
.FlowText {
  color: green;
}
</style>

Likewise you can define CSS class different attributes. finally our page looks like below screenshot

Child Care Donation Page
Child Care Donation Page

You can download the full code from Github or From Chatter. let me know if you are unable to download the code.

Rakesh Gupta’s Salesforce Newsletter of the Week – 12th April 2014

Posted on

Articles that you may like
1)  Salesforce Console for Sales
2) Lead De-duplication through Visual Workflow
3) Add/Remove follower to record with Visual Workflow

Overview of Salesforce Console 

Learn how you can use a Salesforce Console to find and update records quickly in Salesforce. You can easily set up a Salesforce Console for support agents. The console lets agents see multiple customer records on one page in Salesforce. You can also take a look of my article  Salesforce Console for Sales

Release Management: Deploying Changes Using Change Sets

 In this video Salesforce explains how to use change sets to move configuration changes, such as apps, objects, and permission sets, between your organizations. It’s the last in a video series that explains how to manage releases using Force.com’s point-and-click tools, a developer sandbox, and change sets, making it ideal for small-scale organizations with basic deployment needs. For more complex enterprise scenarios, such as building large-scale applications across multiple sandboxes, see the Development Life-cycle Guide.

prepare for additional login pools

Salesforce is creating more login pools, so it means that login.salesforce.com may end up at a different data centre than before, so you need to whitelist all the IP addresses as mentioned. On May 17, 2014, Salesforce production instances will be updated and it is critical that you take the actions mentioned in below URL to prepare your organization. prepare for additional login pools

Tip #1 – Schedule Report For Future Runs

If you’ have turned this on enhanced folder sharing for report, You can check it by following the path

  • Click on Name | Setup | App Setup | Customize | Reports & Dashboards | Folder Sharing
Report and Dashboard Folder Sharing
Report and Dashboard Folder Sharing

You can schedule a report to be sent only to those people who have access to the folder in which the report is stored. If names don’t appear when you search, check whether those people actually have access to the folder.

Schedule Report To User
Schedule Report To User

Tip #2 – Manual Approver Option In Approval Process

While configuring approval process on  step-5 if you selected “Allow approvers to access the approval page from within the salesforce.com application, or externally from a wireless-enabled mobile device” option under the Security Settings section as shown in below screenshot

Allow approver to access the approval page
Allow approver to access the approval page

You won’t get “Let the submitter choose the approver manually” option under step-3 (select assigned approver)  while setting up approval steps,  as shown in below screenshot

Select Assigned Approver
Select Assigned Approver

Salesforce.com Summer’14 Sandbox Preview Instructions

The Sandbox Preview window for Summer ‘14 is scheduled to start on the June 6, 2014. If you would like your Sandbox organization to take part in the Summer ‘14 Preview, your Sandbox must be active on a preview instance by June 6, 2014 to take part in an overall instance upgrade. Gaining early access to Summer ‘14 is a great way to test out new features and settings before the GA release and upgrade of your production org. It’s also important to be aware of the sandbox preview window should you wish to retain the current release in your sandbox org (to effectively opt-out of the preview)

Preview Windows Refresh Schedule

Use the graphic below to assist in understanding and planning around the preview window refresh schedule. For example, if your Sandbox is on CS3 and you refresh it after 12 AM PST on May 31, 20140, it will be moved to a non-preview Instance.

Understanding the Preview Window Schedule
Understanding the Preview Window Schedule

Note:- To learn more about Salesforce.com Summer ‘14 Sandbox Preview Instructions click on the link.

Add/Remove follower to record with Visual Workflow

Posted on Updated on

Add-Remove Follower

In Salesforce a user* can follow Chatter groups or Records. The chatter group manager can also add/remove peoples to the group, for this Salesforce provides out-of-the box functionality. To manage record follower/Subscriber Salesforce does not have any inbuilt functionality like owner want to add follower or want to remove the follower from object records.

Business Use case :- Higher management in Universal Container wants a feature by using user can Add/Remove follower/subscriber to record of Account object.

Solution of above business requirement

First of all I want to say thanks to Andrew Johnson to share his idea and flow( Add follower to record)  he shared in success community . In this blog I will use Visual workflow to solve above business requirement. My main aim is to show the various ways to use Visual workflow in your organization. Before going ahead with the solution you have to understand about EntitySubscription Object. It’s Represents a subscription for a user following a record or another user. User can subscribe to a record or to another user.

Field Name Details
ParentId ID of the record or user which the user is following
SubscriberId ID of the User who is following the record or user

Add Follower to record

First we will ask the end user to enter User Full Name whom they want to make a follower of the record, In the next screen we will show a list of user matches with user name entered on Screen 1 and ask them to select one, As soon as they finish user will added as follower of that record. To develop add functionality follow the below instructions

  • Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
  • Click on New Flow, it will open flow canvas for you
  • First create a variable with name AccountID and we will use into the flow
  • Drag and drop a Screen ( Give the name Enter Follower) on window, and click on Add a Field ( Give the name Enter Follower Name ) to enter User Full Name from user as shown in below screenshot
Screen 1 - To get follower name
Screen 1 – To get the follower name
  • The next task is to display all users where the User Full Name match with Screen1 enter follow name field. To do that again drag and drop Screen on canvas ( Give the name Choose Follower), add Radio button ( Give the name Choose Follower Name) as shown in below screenshot
Screen 2 - Add Radio Button
Screen 2 – Add Radio Button

Now select Dynamic choice as shown in the above screenshot ( Give the name Chooserfollowerfromuserobject), under object select User , Add filters criteria Name equal to Enter_Follower_Name (Screen1 Input field),Under Choice label select Name as shown in below screenshot

Screen 2 - Make it dynamic choice
Screen 2 – Make it dynamic choice
  • On the next screen, our main work is find out selected user Salesforce record ID. To do that we will use Record Lookup element ( Give the name Find Selected user ID), under Loo up select User , enter search criteria Name equal to Choosee_Follower_Name, and store recordID into some variable as shown in below screenshot
Step -3 Find out selected user's record ID
Step -3 Find out selected user’s record ID
  • The next task is to create a record into EntitySubscription object . it’s required Parentid and SubscriberId. we have SubscriberId, for ParentID we will use AccountID variable.  Now Drag and Drop Record Create element into the canvas ( Give the name Auto add follower into the record), under create select object EntitySubscription and assign value into Parentid and SubscriberId as shown in below screenshot 
Step -4 Create record on Entitysubscription object
Step -4 Create record on Entitysubscription object

Finally it will look like below screenshot

Add Follower to record flow diagram
Add Follower to record flow diagram

Now create a button (Add Follower) on Account object to call this flow and assign {!Account.Id} into variable AccountID

Link will be /flow/Add_Follower_into_record?AccountID={!Account.Id}&retURL=https://ap1.salesforce.com/{!Account.Id}

Remove Follower from the record

First we will ask the end user to enter a UserID of the user’s whom they want removed as a follower (Subscriber)  from the record, as soon as they click on finish button user will automatically removed from follower (Subscriber) list to the record. To develop remove functionality follow the below instructions

  • Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
  • Click on New Flow, it will open flow canvas for you
  • First create a variable with name AccountID and we will use into the flow
  • Drag and drop a Screen ( Give the name Remove Subscriber) on window, and click on Add a Field ( Give the name Enter Subscriber User ID ) to enter a UserID from user as shown in below screenshot
Step 1 - To get subscriber ID
Step 1 – To get subscriber ID
  • In the next screen we will remove this subscriber from the record. Drag & Drop Record Delete element into the canvas, and give the name Remove follower. Under delete drop-down select EntitySubscription object and map the field as shown in below screenshot
Step 2 - Delete follower
Step 2 – Delete follower

Now create a button (Remove Follower) on the Account object to call this flow and assign {!Account.Id} into variable AccountID

Link will be /flow/Remove_follower?AccountID={!Account.Id}&retURL=https://ap1.salesforce.com/{!Account.Id}

Now it’s time to test this feature

Add Follower

1) To add follower to the record, navigate to the Accounts tab and click on any Account Name to open it’s detail page, and click on the Add Follower button as shown in below screenshot

Step 1 - Click on button to open flow
Step 1 – Click on button to open flow

2) Enter name of the user whom you want to add subscriber of that account record, you can take help from below screenshot  and click on Next

Step 2 - Enter new subscriber name
Step 2 – Enter new subscriber name

3) On the next screen you can select subscriber from the list of users based upon your search criteria, as shown in below screenshot and click on Next

Step 3 - Select one user
Step 3 – Select one user

4) You will drill down to account detail page and user will added as follower, below is the screenshot as a proof

Step 4 - User added as subscriber
Step 4 – User added as subscriber

 

Remove Follower

We will remove the same follower that we added on the last step.

1) To remove the follower from the record, navigate to the Accounts tab and click on any Account Name to open it’s detail page, and click on the Remove Follower button.

2) It will open Remove follower flow for you, enter UserID  whom you want to remove as a subscriber of the  record, you can take help from below screenshot and click on Next

Step 1 - Enter UserID
Step 1 – Enter UserID

3) You will redirect to account detail page, and the user is removed from follower list. You can check below screen shot

Step 2 - Follower removed
Step 2 – Follower removed

Note:- You can enhance Add/remove functionality by using Loop and collection  (Spring’14 pilot feature) to show the list of users that are not following record. Currently I am showing all users from an organization based on user name entered (Step 2 – Enter new subscriber name) .

Lead De-duplication through Visual Workflow

Posted on Updated on

 

De-duplication

A Lead is the identification of a person or entity that has the interest to purchase a product or service from your organization. People who managing Lead in Salesforce, they face one major problem i.e. Lead De-duplication. Salesforce does not have any out-of-box app that will check based on some parameter for duplicate lead while creating new Lead in system. You can achieve this functionality by using Visualforce page and Apex, but it’s requiring knowledge of both. In this article I will focus on how to achieve this functionality by using Visual workflow.

Business Use case :- Higher management in Universal Container wants to build functionality for Lead De-duplication where they want to enter Company Name on first screen and if any company exists with same name display all, user will select one and redirect them to selected lead’s detail page. In case if lead is does not exist with Same Company Name it redirect them to New Lead page with auto populate Company Name that user entered as search criteria.

Solution of above business requirement

First of all I want to say thanks to Andrew Johnson for his blog Making a Dynamic Choice That Much Better . In this blog I will use Visual workflow to solve above business requirement. To develop this functionality follow the below instructions

  • Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
  • Click on New Flow, it will open flow canvas for you
  • Drag and drop a Screen ( Give the name Get Name) on window, and click on Add a Field to enter Company Name from user as shown in below screenshot
Screen -1 Get Company Name
Screen -1 Get Company Name
  • Next is to check whether search entries return one or multiple result. Based on that we will redirect user to respective screen. To do that I used next two look up Pass 1 and Pass 2.
  • In Pass 1 lookup I am comparing  Company Name (User Input) with Company field of Lead and store ID in FirstID variable, as shown in below
First pass
First pass
Second Pass
Second Pass
  • Next work is to create a decision, If multiple records exist with Same Company Name we will redirect user to a screen from where he/she can choose existing record. If no record exists with same Company Name we will redirect user to New lead creation page. Drag and drop decision element in canvas and create two outcome Yes and No as shown in below screen shot
Decision Element
Decision Element
  • Now we will create screen and it will display multiple lead records. Drag & drop screen into Canvas and give name Dynamic choice display, Add dynamic Choice field and select
    1. Create a choice for object :- Lead
    2. Field :- Company equal to Company_Name (Variable)
    3. Choice label :- Name (Lead Name)
    4. Save ID of the record in variable ThirdID

You can take help from below screenshot

Dynamic Choice display
Dynamic Choice display

In the next Screen we will display selected record (with a link from where user can open selected record). To do that Drag & drop screen into Canvas and give the Name DisplayThirdID , add one output field and create a URL same as below screenshot

Display URL to redirect user into selected record
Display URL to redirect user into selected record

Link will be https://instanceid.salesforce.com/{!ThirdID}

  • Now we will create two Screens. First Screen display no record found with entered Company Name message and then we will redirect user to next Screen where her/she found a link to create new Lead. To do that first Drag & drop Screen into Canvas and just display a message (No record exist with name Company_Name ).Again drag & drop screen into Canvas and give the name toOpenNnewLeadPage, add one output field and display field and display link
Create new lead record
Create new lead record

Link will be https://instanceid.salesforce.com/00Q/e?retURL=%2F00Q%2Fo&lea3={!Company_Name}

Finally it will look like below screenshot

Final Design
Final Design
  • Save this Flow and create one VisualForce Page and reference your flow

<apex:page standardController=”lead”>
<flow:interview name=”YourFlowName”/>
</apex:page>

  • Overwrite your New Button available on Lead object. To do that follow the path Name | Setup | App Setup | Customize | Leads | Buttons, Links, and Actions | New Overwrite it with VisualForce page that you created in last step.

Now it’s time to test this feature

  1. First we will try to enter Campany name that already exist in system. To Create New lead, navigate to Lead tab and click on New Button, it will open visualforce page and enter Company Name ( In our case enter Salesforce.com) for which you want to create lead and click on Next, as shown in below screenshot
Step -1 Enter Company name
Step -1 Enter Company name

If Lead with same Company Name exist in system, it will return whole list and click on Next, as shown in below screenshot

Step -2 Select One record
Step -2 Select One record

You will redirect to a new Screen where link will appear and click on it, to go to selected record detail page

Step -3 Click on Link to open record
Step -3 Click on Link to open record

2. Now  we will create lead with Company name that is not exist in System.

  • Again create new record by navigating Lead tab and click on New Button, Enter Company Name as Universal Container and click on Next,, as shown in below screenshot
Step -1 Enter New Company Name
Step -1 Enter New Company Name
  • It will redirect you to screen where message will display like below screenshot and click on Next
Step -2 Display no record exist message
Step -2 Display no record exist message
  • Now a screen will appear with link, click on the link to create New Lead
Step -3 Click on Link to Create New Record
Step -3 Click on Link to Create New Record

Note:- You can add more fields on screen first as per your requirement to find lead records.