Salesforce1: Deleting Topics in Salesforce through flow ( A hidden concept)




Chatter Topics helps you to associate your updates with other posts and comments on the same topic by using ahashtag (#). 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 Topicyou are looking for. Now I am coming to the point way to delete Topics in SalesforceIn Salesforce document it’s mentioned People with the “Modify All Data” or “Delete Topics” permission can delete topics using the Chatter APIor 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 nameEnter Topic Name) and make it required as shown in below screenshot

  • The next work is deleting entered topics. Before going ahead you have to understand about TopicsObject. 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 selectTopic, and map Name –> Input field from last screen. as shown in below screenshot

  • Finally our flow will look like below screenshot

  • 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

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.

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

Now check Topics, as shown in below screenshot

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, Select Available for Salesforce mobile apps check box and embed your Flow and crate a Visualforce Tabs to call it. Below 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

It will look like below Screenshot on Salesforce1 App

Post a Comment

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget