Deleting Topics in Salesforce through flow ( A hidden concept)

Posted on

Delete Hashtag

Chatter Topics helps you to associate your updates with other posts and comments on the same topic by using a hashtag (#). By using hashtags, you create a topic link that categorizes your update so other users in your company can find it more easily. You can also use Chatter Search to find updates and comments that match the Chatter Topic you are looking for. Now I am coming to the point way to delete Topics in Salesforce. In Salesforce document it’s mentioned People with the “Modify All Data” or “Delete Topics” permission can delete topics using the Chatter API or the SOAP API. Another way to delete Topics is use Developer console or Workbench.

Business Use case :- Higher management in Universal Container wants to develop an application, from where they can easily delete Topics. Their system administrator frustrated from the old way from where every time they have to query to delete topics by using Developer console or Workbench.

Solution of above business requirement

Again this is power of Visual Workflow, we will create an app without using a single line of code. Our app starts with a screen where the user can enter topic he/she want to delete, as soon as he/she can delete next topic will delete from Salesforce. 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
  • Drag and drop a Screen ( Give the name Enter Topic) on the window,add one field ( Give the name Enter Topic Name) and make it required as shown in below screenshot
Enter Topic Name
Enter Topic Name
  • The next work is deleting entered topics. Before going ahead you have to understand about Topics Object. It represents a topic on a Chatter post or record.
  • Drag and drop a Record Delete ( Give the name Delete Topic) on the window. Under object select Topic, and map Name –> Input field from last screen. as shown in below screenshot
Delete Topic
Delete Topic
  • Finally our flow will look like below screenshot
Flow for delete topic
Flow for delete topic
  • Save the flow and close the canvas.

Add Visual workflow into the home page component

We can call flow from custom button, link, sub-flow, Visualforce page. Here we will call our flow from the home page component. To do that follow below instruction

  1. Create custom link from Name | Setup | App Setup | Customize | Home | Custom link
  2. Add custom link in the Home page component
  3. Add Home page component into the Home page layout
Add flow on hope page layout
Add flow on hope page layout

It’s time to test this feature

Now we will delete Chatter Topics through our app. Currently I have three topics in my Org you can see below screenshot.

Topics available in my org
Topics available in my org

Open our app and enter Topics  that you want to delete. In my case I am going to delete Topics  chr and click on the Next, as shown in below screenshot

Enter Topic Name and click on next
Enter Topic Name and click on next

Now check Topics, as shown in below screenshot

Final Output
Proof of concept

Note :-When deleting topics, consider below points

  1. Topics are hard deleted. They aren’t sent to the Recycle Bin.
  2. Deleted topics are removed from search results, the topics list, all posts and records, Recently Talked About topics, Related Topics, and your users’ favorites. Deleted topics are removed from Trending Topics after the next calculation.
  3. Deleted topics are not blacklisted. Users can reintroduce a topic after it’s been deleted.

Use this app on Salesforce1

  • To use this app on Salesforce1 , create a Visualforce Page, And embed your Flow and crate a Visualforce Tabs to call it. Belw is the sample code for your reference

<apex:page >
<br/>
<Center><Font size =”6″ color =”orange”>Delete Chatter Topics</font></Center>
<br/><br/>
<flow:interview name=”Delete_Topics”/>
</apex:page>

  • Now navigate to Name | Setup | Administration Setup | Mobile Administration | Mobile Navigation
  • Add you Visualforce Tabs into selected pane, as shown in below screenshot
Add Visualforce Tab into Mobile Navigation
Add Visualforce Tab into Mobile Navigation

It will look like below Screenshot on Salesforce1 App

Delete Topic App on Salesforce1
Delete Topic App on Salesforce1

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.