Monday, 18 February 2013

Allow users to share articles via public URLs

Every organization has a set of information, in Salesforce, this information is called Knowledge. A Knowledge base consists of various articles,article type, categories, sub categories etc. An article, as the name suggests, is a piece of information which we might want to share with the customer. 

Salesforce provides two methods of sharing articles with an external user via email.
1. Send article as attached PDF
2. Allow users to share articles via public URLs

Sending article as a PDF is quite straightforward. However, sending article URL is not that straightforward. In order to Send article as URL you first need to accomplish the following tasks.
1. A public Force.com Site dedicated to your articles.
2. A public knowledge base.

if you don't know how to set up a public knowledge base, you can implement it using salesforce guide :
https://ap1.salesforce.com/help/doc/en/salesforce_pkb_implementation_guide.pdf

After setting up public knowledge base make sure that the articles for which you want to share the URL are published and visible on public site.

Below are the steps:

STEP 1: Allow users to share articles via public URLs , you can do this by going to Your Name --> Setup --> Customize --> Knowledge --> Settings . Click the checkbox 'Allow users to share articles via public URLs'.

STEP 2: Enable Chatter feeds , you can do this by going to Your Name --> Setup --> Customize --> Cases --> Support Settings . Click the checkbox 'Case Feeds Enabled'. Also  make sure that your profile has sufficient permissions to view case feeds.

STEP  3: Attach the article you want to share with the case and click on 'Answer Customer' to send and Email. on the 'Articles' block below click down arrow button. You will get an option to 'Share article link from <Your Site Name> ' . On clicking this the URL for the article will be added to your Email. it looks something like this : 
Click the highlighted option and the URL will be added to Email.


Hope you find this helpful, if you face any problem don't hesitate to leave a comment or mail me.

Thursday, 14 February 2013

Display Cases in Home Page Layout or Home Tab

Many a times we need to display cases on the Home page layout or Home tab of user. We can customize our Homepage by using components provided by Salesforce like calendar,tasks,custom links but unfortunately, there is no standard component for Cases which we can include in our home page layout.

There is a solution. All we need to do is to create a simple visualforce page and include it in our layout. Here is the step by step solution

STEP 1- Turn on the development mode in your Salesforce org and create a simple visualforce page which displays a list of all the cases. Here is the code:

<apex:page showHeader="false">
<apex:ListViews type="Case" />
</apex:page>

STEP 2- Create a home page component using this visualforce. You can find the steps in this post

STEP 3- Select the layout and go to your home page. it will look something like this: 
Cases on Home Page Layout

However there is a crunch, if you click on a case it open it , it will be displayed like this.

No Body would like to  open a case like this right?

Obviuosly, this is not we want. Here a simple HTML tag comes to our help the <base> tag. We need to use the tag <base target="_parent"/> in our code. This will fix the error and will redirect us to the case record page whenever we click on a record. Thus the final step will be.

STEP 4 - Go to the visualforce page we created and edit the code. The new code of the visualforce page should be:

<apex:page showHeader="false">
<base target="_parent"/>
<apex:ListViews type="Case" />
</apex:page>

Click Save. Go to your home page you will get all the cases.

If you have any question or problem in impelementing it please leave a comment or mail me at shahid2889@gmail.com

I hope you will find this post useful.