You need to sign in to do that
Don't have an account?
Marcel dos Santos
Implementing question form in Salesforce Communities
I am implementing a pixel level customized Salesforce Community. To be able to have the forms, divs and fields we want, I am using a Visualforce + Tabs template and writing Visualforce code for all the pages and forms I need.
Now I'm starting to implement pages and forms to list questions and answers, post questions, vote for questions and best replies, etc. To be able to display all the fields and categories the way we want, I'm gonna have to query Salesforce object using SOQL. What is not clear to me is what objects to use. From what I've read in forums and Salesforce Communities documentation, the right way to do it is to work with Chatter Answer objects (Question, Reply, QuestionDataCategorySelection), etc. Another option I see for that is using API objects like Topic, TopicAssignment, FeedItem and FeedComment.
I have two questions:
1- What is the right approach to implement a question form and list in a Salesforce Community from the scratch? Although I feel like the right way to do it is using Chatter Answers objects, I tried a Napili template community before and the questions and topics I created were saved in FeedItem, FeedComment, Topic and TopicAssignment objects.
2- As I can use only one CategoryGroup per Community (zone), if I use Question, Reply and QuestionDataCategoryObjects, am I restricted to only one category per question?
Now I'm starting to implement pages and forms to list questions and answers, post questions, vote for questions and best replies, etc. To be able to display all the fields and categories the way we want, I'm gonna have to query Salesforce object using SOQL. What is not clear to me is what objects to use. From what I've read in forums and Salesforce Communities documentation, the right way to do it is to work with Chatter Answer objects (Question, Reply, QuestionDataCategorySelection), etc. Another option I see for that is using API objects like Topic, TopicAssignment, FeedItem and FeedComment.
I have two questions:
1- What is the right approach to implement a question form and list in a Salesforce Community from the scratch? Although I feel like the right way to do it is using Chatter Answers objects, I tried a Napili template community before and the questions and topics I created were saved in FeedItem, FeedComment, Topic and TopicAssignment objects.
2- As I can use only one CategoryGroup per Community (zone), if I use Question, Reply and QuestionDataCategoryObjects, am I restricted to only one category per question?
The Napili template (as well as plain old Chatter) uses FeedItem to store the first post of any conversation. This FeedItem will be associated with one of the Navigation Topics (and potentially other topics) by way of the TopicAssignment object. Comments to the original post will be tracked as FeedComment records. So let's say your community is run by Napili, and has the following Navigation Topics:
Routers (RecordId = 123456ABCDEF)
Access Points (RecordId = 2345678BCDEFG)
Then creating a post in Napili to the Routers section would create data that looked something like this:
FeedItem
ID: <auto-generated>
Title: <title of post>
Body: <body of post>
ParentId: <Id of posting User>
Type: QuestionPost
TopicAssignment
Id: <auto-generated>
EntityId: <id-of-your-post>
EntityType: FeedItem
NetworkId: <id-of-your-community>
TopicId: 123456ABCDEF
In this setup, navigation topics take the place of the CategoryGroups used by Chatter Answers. Since nav topics are connected by config to Data Categories, you can get to that as well.
Net-net: I strongly recommend you use the modern capabilities in FeedItem and FeedComment.