Hands on 5 - adding Flow to the home page layout

Now we will create a home custom link and add it to the home page layout; to call the Flow user, we have to click on this custom link:

  1. To create a home custom link, navigate to Setup | Build | Customize | Home | Custom Links and click on the New button. Enter the Name field as Clean Chatter Group Feeds; for Behavior, select Display in existing window without sidebar or header; for Content Source, select URL, and construct the URL.
    At the end, the custom button URL will look like /flow/Delete_Chatter_Group_feeds?retURL=/home/home.jsp.  The retURL=/home/home.jsp part will redirect the user to the home page after completion of the Flow execution. Your custom button should look like what is shown in the following screenshot: 
  2. Now we will add a home custom link to a new home page component. To create this, navigate to Setup | Build | Customize | Home | Home Page Components and click on the New button. Enter the Name field as Clean Chatter Group Feeds; for Type, select Link and then move a custom Clean_Chatter_Group_Feeds link from the Custom Links not to show pane to the Custom Links to show pane, as shown in the following screenshot:
  1. Once you are done, click on the Save button.
  2. Finally, add this custom component to the home page layouts. To do this, navigate to Setup | Build | Customize | Home | Home Page Layouts, click on the Edit link available in front of all home page layouts, and then select the Clean Chatter Group Feeds component and save the changes.
  3. To test this Flow, navigate to the Home tab and click on the Clean Chatter Group Feeds link available in the narrow (left) component:
  1. This will redirect you to a new window, where you have to enter Chatter Group ID and Date and click on the Next button:

Flow will delete all the textposts where the CreatedDate is earlier than the date you have entered.

The problem with the preceding Flow, Delete Chatter Group feeds, is that if the Record Delete element doesn't find any textpost based on the filter criteria, then it will fail at runtime and the Flow owner will receive an e-mail with an error message, Encountered unhandled fault, as shown in the following screenshot:

This means if a Flow fails at runtime or if any unhandled exception occurs, then the user who created the Flow will receive a fault e-mail from Salesforce with a fault message. The e-mail includes the error message from the failure and details about every flow element that the interview executed. To resolve this error, we have to add a few elements (Record Lookup and Decision) to the Flow, Delete Chatter Group feeds.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.27.91