9

You can get it from ctx. See more about ctx. Current Discussion Item var discussionItem = ctx.CurrentItem; Current Discussion Item ID var discussionItem = ctx.CurrentItem.ID; You need to ensure that sp.js is load in the page. SP.SOD.executeFunc('sp.js', null, function() { submitReply(); }); No need of line var ctx = new SP.ClientContext.get_current(...


8

Actually you don't need to modify the OOTB files. In fact, it's a very bad idea, since Microsoft doesn't support modifying any of OOTB files in Layouts directory, except of DocIcon.xml. Any cumulative update or SharePoint service pack can replace these files, so your customizations will vanish in one moment. What you need to do, is to create your own file, ...


7

Looks like the trick is to use list.Folders: foreach (SPListItem folder in myDiscussionList.Folders) { // do something } Source: How to Read All Discussions and Replies


7

If you have SharePoint designer, open the view with it and change the settings "read only" to FALSE and then you will be able to modify the views from SharePoint.


5

When you change a page in SPD, it becomes customized (unghosted). Thus, GhostedXslLink no longer works. More details about ghosted and unghosted pages here: http://www.etechplanet.com/blog/ghosted-and-unghosted-pages-in-sharepoint.aspx You should use XslLink property instead of GhostedXslLink for unghosted pages. Just change it in the property editor in ...


5

Take a look at sp.ui.discussions.debug.js Here's one way to trigger Featured link. You may have to use ExecuteOrDelayUntilScriptLoaded or some sort of setTimeOut delay. $(doucument).ready(function() { // SortItem4 is for Featured setTimeout(function(){ SP.UI.Discussions.SortFilterItem.onPivotControlMenuOptionClick('SortItem4'); }, 500); };


4

Here is my answer to somewhat similar question. It is 2010 solution in Powershell but you can easily convert it Moving a Discussion from a Discussion Board to another? Addition: I posted my original answer from my mobile device so I feel obligated to provide more info. To simplify things: In discussion list discussions are folders and messages are items ...


4

SharePoint OOTB Discussion Boards are not designed to work in a folder-like structure. I assume you are trying to better categorize your discussion boards into topical groups. Here are a few alternative routes you might try: 1) Use a Category column that you filter on. Then you can use the various SharePoint filter web parts to "drill-down" to the posts ...


4

You need to change the view for this, if you look closely with your current code - look at the first post iteration, it starts from ID=2 instead of 1, change the view to enumerate over subject and reply both. So instead of SPListItemCollection oSpListItemClnPost = oSpListPost.Items; try this SPListItemCollection oSpListItemClnPost = oSpListPost.GetItems(...


4

The exact solution exists as a site template in SharePoint 2013. Communities Otherwise (for SP 2007, 2010 or 2013) you could build a list that holds questions and answers. On that list you place an event receiver (Or workflow) that emails the specified users (could be defined in a list or something). the users then can log in, answer the question and the ...


4

When you inherit Content Types, you should inherit as is. Otherwise you'll lose functionality of the default content type and breaks internal dependencies. That's the whole point of inheritance. Either you inherit and add (not remove) features, or you don't inherit at all. There is a reason why site column properties are grayed out, and "solving" it with ...


4

The discussion board list has "Unanswered questions" and "Answered questions" view by default. The question in which at least one of the replies is marked as "Best Reply" will show in the "Answered questions" section. If the question does not has "Best Replay", it will show in the "Unanswered questions". Note: Only questions which the "Question" field is ...


3

You could create a column that would represent all of your topics. This could be a choice column that you would use to edit the properties of the discussion. Then, you could create a view that groups all discussions based on their topic. You will have the same data all automatically categorized. For the hierarchy, a message can only be created when you ...


3

This could be accomplished on client side. Below is provided full solution description. Script for highlighting discussion list replies: ExecuteOrDelayUntilScriptLoaded(highlightDiscussion, "sp.js"); function highlightDiscussion() { var discussionGroupId = 3; var clientContext = new SP.ClientContext.get_current; var groups = clientContext....


3

Thanks for the post, I have tweaked the script a bit to loop through all discussion items in a discussion board and move them to a new list. # Migration of a discussion forum to a new list # to overcome commenting issue caused by Meta-Vis # Migration #Region Load SharePoint Snapin $ver = $host | select version if ($ver.Version....


3

I am a bit puzzled with your script so I decide to find another way :) Discussion board is tricky to deal with. Discussion are folders and Messages are items inside folders (very simple explanation). Best way to migrate one Discussion from source to destination list is to recreate new Discussion on destination list and then to recreate all Messages inside ...


3

Inside your RootTemplate (name="View_Thread_Default_RootTemplate"), you have <xsl:attribute name="class">, but you cannot use xsl:attribute without a parent tag. That is what causes the error. To fix it, you should either remove the <xsl:attribute> tag, or wrap it to some HTML tag (i.e. <div>). After wrapping to <div>, the error ...


3

Yes, there is - there is the "Create Document Workspace" option. Alternatively, you could use a lookup column on your Discussion list to refer to a particular document in a document library. You could also modify the 'Properties' form on the document library to display any discussions that refer to it. Or alternatively you could allow attachments on your ...


3

Discussion forum > List Settings > Advanced Settings > Item Level Permissions should take care of that. See the screenshot. Select "Create items and edit items that were created by the user" in the Create and Edit access section.


3

I think you got the answer by now. Recently I get into same problem so here is what I think. Discussion board app - You would not choose this approach unless you don't need the feature like reputation. This app is just a document library limited in two content types: message and reply. Community site - It gives you the full feature of a dicussion board ...


3

On the Ribbon, under List > Alert me > Set alert on this list, you can set alerts when new items are added


3

Try adding dialogReturnValueCallback:RefreshOnDialogClose to your options object: var options = { url : pUrl, dialogReturnValueCallback:RefreshOnDialogClose };


3

First you need to make sure the D board has ratings turned on. This is under Ratings settings in the list settings. Then the subject view should show the likes or stars and what we especially wanted: the # of replies. If you were displaying the D board in a web part you may need to edit the web part and "reapply" the view to get it to update.


3

I had this same problem. My discussion board is on a publishing site, not team or community. The views are not editable. The only solution I found is to edit the list in SharePoint Designer. Go to the discussion board and on the ribbon click to edit the list in SharePoint Designer. When it opens, click the view you are using (like subject) then you get a ...


3

Edit the page and then edit the web part in question and you can change the view. You can select one of the different views available, or create one that matches what you want!


3

You wrote you have already the particular question you need the replies for. Then you should now its ID as well. Using that ID you can filter the items for the replies for the particular question via REST (assuming the ID is 234): http://YourServer/YourSite/_api/Web/Lists/GetByTitle('TitleOfYourDiscussionBoard')/Items?$filter=ParentItemID eq 234 Note, that ...


3

@PaulStrupeikis got it correct. So for powershell, you need to use it as below: $web = Get-SPWeb "http://servername/" $list=$web.Lists.TryGetList("News & Announcements") if($list -ne $null) { $newTopic = [Microsoft.SharePoint.Utilities.SPUtility]::CreateNewDiscussion($list, "Test announcment"); $newTopic["Body"] = "test body"; $newTopic["Modified"] = ...


2

Lightning Tools has a Discussion board that does this and so does Quest I believe. If buying a thrid party discussion board tool is not an option, you should be able to create a new column (Choice or Yes/No) and use that as an accepted solution function. It wouldn't let you specify what the accepted reply was, but that the question has been answered.


2

The CTID is the ContentTypeId from the listitem and the rootfolder is ServerUrl from the listitem. Try this code to see if it gives you the url you want. You could also dynamically get the viewurl if you desire. var url = "http://contoso/Lists/forum/Flat.aspx?RootFolder=" + message["FileDirRef"] + "&CTID=" + message["ContentTypeId"];


2

To answer your question, if users are set to restricted read on the discussion list, they will not be able to reply to the discussions. They would need an elevated priviledge, like a custom permission based off of Read that allows them to Add list items in order to reply. This then makes it so they can't edit anything or delete anything. Rob's suggestion ...


Only top voted, non community-wiki answers of a minimum length are eligible