Tag Info

Hot answers tagged

2

Edit the page containing the Discussion Board List. Select the web part and Click on Edit webpart. Select Toolbar Type to "No Toolbar" and save the webpart.


2

You also need to set properties.Cancel = true; Your final code will look like public override void ItemAdding(SPItemEventProperties properties) { try { //my code SPListItem parentItem = oList.GetItemById(discussionId); SPListItem reply =SPUtility.CreateNewDiscussionReply(parentItem); reply["Body"] = ...


1

So you can achieve this using changing the view of your Discussion board. Path : Your discussion board -> List Setting -> Views -> Threaded(Flat in online) -> check this option --Make this the default view -> Save.


1

Shailen Sukul has a great example posted on the MSDN forums. I suggest you start there first. https://social.msdn.microsoft.com/Forums/en-US/54d780ea-df2f-408d-9056-cf6f0c27f04e/add-xsltlistviewwebpart-via-code?forum=sharepointdevelopmentprevious


1

In code you can SPGroup spGroupItem = web.Groups["GroupName"]; SPRoleAssignment oRoleAssignment = web.RoleAssignments.GetAssignmentByPrincipal(spGroupItem); foreach (SPRoleDefinition inRole in oRoleAssignment.RoleDefinitionBindings) { //inRole.id //inRole.Name //1073741829 //limited access } Or you can find it using below function bool ...


1

Using jquery would be fine, but just flip the approach. Instead of hiding the webpart if its empty , make the webpart hidden by default, and visible only when content is available. Here is the approach. Add a Content Editor / Script Editor webpart with CSS code that hides(remember just mark display none / visible false, dont remove) the Discussion List ...


1

If you are using SP2013/2010, there is a feature for what exactly you are looking for. 1) Go to the document library. 2) Select a document(by clicking the check-box). 3) Open the Library tab from the ribbon on the top. 4) Click on the "Tags and Notes" link on the ribbon. 5) Click on the "Note Board" tab on the Popup. 6) Write your comment and ...


1

Consider setting up permissions right after the topic is created. In simplest case you can do it manually: click Manage discussions link, select discussion and click Shared With: Or you can create a workflow for that, that would pick the settings from the field. This opensource project provides a set of workflow actions for setting permissions: ...


1

Out of the box, it's not possible to get notifications unless you are mentioned or replied to. All Newsfeed settings can be found at About Me > Edit > ... > Newsfeed settings Reference: Change your newsfeed settings


1

Since a reply in Discussion Board is represented as List Item you could utilize a common update operation as demonstrated below: var ctx = SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle('Discussion Board'); var messageItem = list.getItemById(listItemId); //get message item by its Id messageItem.set_item('Body','Welcome to ...


1

A discussion board comes with two content types: Discussion and Message. Discussion is the high-level content type, Message is all the replies. If you add your "State" or "Status" field or whatever to the Discussion content type, it will only apply to the question, not the responses. Create a Site Column called State, and give it whatever values you ...


1

How to post a reply in Discussion Board using SharePoint JSOM Use SP.Utilities.Utility.createNewDiscussionReply(Context, parent) Method to post a reply to a discussion item: function createMessage(discussionItem,properties,OnItemAdded,OnItemError) { var context = new SP.ClientContext.get_current(); var messageItem = ...



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