Hot answers tagged

8

Even though the CSOM ListItem class does not have a ModerationInformation property, I was able to access this value through the field's internal name: ListItem item = file.Item; clientContext.Load(item); clientContext.ExecuteQuery(); int status = Convert.ToInt32(item["_ModerationStatus"]); And the enum is defined as: public enum SPModerationStatusType { ...


8

I solved this by using a CamlQuery directly after creation to return folders with the same name as a ListItemCollection: SP.CamlQuery query = new SP.CamlQuery(); query.ViewXml = "<View Scope='RecursiveAll'>" + "<Query>" + "<Where>" + "<And>" + ...


5

I answered something similar to this the other day, as it relates to #2 anyway. Creating Sharepoint Alerts only for published documents ...and don't be concerned that it doesn't have any upvotes or isn't marked as answered. I've used/tested this in the past, so I know it works. :) Just add: <FieldRef Name=\"_Level\" /><Value ...


4

You can remove the Workflow and Approval Process from the pages Library. To do so Site Actions - > View All Site Content - > Open Pages Lib and In the Pages Library select Settings -> Document Library Settings -> Versioning settings Select the Following Say no to Require content approval for submitted items? Select No Versioning And In Workflow settings ...


4

a) Not without creating a dummy user, no. b) Yup, not that complex either, just need to check the SPListItem.Level property of each version of a file, and look for the Published level. See here for more info: http://mysharepointwork.blogspot.com/2011/03/get-published-version-of-list-item.html Or here: ...


4

Since Content Approval status is stored in List Item (_ModerationStatus) I would recommend to leverage any client APIs (JSOM, REST or SOAP) for that purpose. How to retrieve content approval status using client APIs JSOM function getListItemModerationInfo(listId,itemId,success,error) { var ctx = SP.ClientContext.get_current(); var web = ...


3

So while writing the question i answered my own question. "Draft Item Security" setting says "Only Users who can EDIT". So we must change to the permission-level from Full Read to Full Control, not the cleanest way to solve this, but it works. Have any input please let me know :)


3

It does not seem possible to approve a list item since _ModerationStatus property is not exposed by REST in SharePoint 2010. But, Approving/Rejecting could be performed with SharePoint SOAP services as demonstrated below: function approveItem(webUrl,listTitle,itemId) { $().SPServices({ webURL : webUrl, operation: "UpdateListItems", ...


3

I just checked and I'm also getting the same behavior. This is happening only for the documents that are previously approved. As a workaround you can go to Versioning settings and for Draft item Security select "Only users who can edit items". That way the author can see the document.


3

The survey list can handle this out of the box. If that doesn't suit the need, then you can create a custom list with all your form fields and create a custom InfoPath form to show/hide content or use javascript/jQuery on the form pages to show/hide infomation. If you want it to be a document, then you can use a form library and create your own InfoPath ...


3

You can use workflows to accomplish this. Turn on Content approval, then create a workflow that has the email and approval elements you require. Here are some resources to help you along: Get started with workflows in SharePoint 2013 http://msdn.microsoft.com/en-us/library/jj163917.aspx SharePoint 2013 workflow fundamentals ...


3

Not really, if the user is going to be creating and managing permissions, then that comes with the territory. Full Control grants this right so being listed as such gives them the trust that the permissions changes they are doing are desirable. If you're really that concerned, then give her Contribute or Design rights on the site and manage the security ...


3

According to this, the Approval Status field is a lookup field and not applicable for calculated fields. My approach to the issue would be to create a separate calendar view of items with a filter of Approval Status = Pending. This way, approvers can toggle between the approved and pending data and easily distiguish what needs to be approved.


2

If you go to the library that holds your file(s), you should have an Approve/Reject view you can use to view the item(s) needing approval and approve them. Or you can just find the item in the library and approve it. Clicking on the tick box by the item should expose a option to Approve/Reject in the UI. You might want to try repairing Office and ...


2

I am not quite sure that if you are looking for the links to the 'Approved' and 'Rejected' radio button but I would suggest the following alternative if you know how to use SPServices: Try creating a new column (a single text field column should be fine) and named the column "isitApproved". Then create a page using SPServices that provide two button - ...


2

Since the Published and Draft documents have the format: {MajorVersionNumber}.0 for Published {MajorVersionNumber}.{MinorVersionNumber} for Drafts for your scenario the View could be created with the following filters: By Published documents that corresponds to [Version] CONTAINS .0 By Author [Created By] = [Me]


2

Any chance you could use a Survey list? The Survey list type allows for conditional questions, which sounds like what you are looking for. Answers to a given question can be evaulated and then used to serve up matching questions in resonse.


2

It will display a month layout, with each day being clickable. SharePoint calendar default behavior When a day is clicked, a popup would allow someone to select a two-hour time window from a range of hours, if no one else has taken it. Some custom event receiver needed to check if time window is free. Trick part is how to allow only two-hour ...


2

My first thought here is: use the SharePoint Search. If there are documents/pages waiting on approval, there usually is a task assigned to an author for approving. Use SharePoint Search to search for Content Type Task and then filter for the current user. This way you use the info already stored by search. Easy and fast! Ans you can create a very powerful ...


2

Versioning can be useful in many scenarios like collaboration. Take a simple example of expense management system. A user goes in and adds the details of his expenses (travel, food etc). At this time the expenses will be in pending state. The manager of the user can then approve/reject his claims. So, it will turn into either approved/rejected. Another ...


2

Set the Draft Item Security in the Announcement List in Child site to either "Any user who can read items " or "Only users who can edit items" while setting the versioning settings. This way users can see every announcement item in the child site. In the parent site set the logic for seeing Approved items only in a webpart like COntent Query Webpart. EDIT ...


2

I think you have to go into every page / image / doc library - Settings, Versioning settings and set content approval to no.


2

You need to get the association ID of the workflow and set following property to set it programmatically. SPList.DefaultContentApprovalWorkflowId


2

The dumb workaround, if nothing else works, is to turn content approval on, add a dummy attachment, and then remove that dummy attachment. Dumb workaround #2: re-create the list if it's only on this one list. Make sure the advanced settings allow read access to all items, and that you can see draft items in the list. Further investigations would be to ...


2

If you enable the content approval you also need to enable major and minor versions in order to work. Doing so will create a new view on the Pages Library that is called "Approve / Reject" where all the wiki pages are listed that have pending approvals or have been rejected. For the permission level: There is one permission level that is called approve. ...


1

You can't, this is an all or nothing setting. It is either content approval for everyone, or no one.


1

check this out: WorkflowContext.AllowDefaultContentApproval http://msdn.microsoft.com/en-gb/library/microsoft.sharepoint.workflowactions.workflowcontext.allowdefaultcontentapproval.aspx SPWorkflowTemplate.AllowDefaultContentApproval http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowtemplate.allowdefaultcontentapproval.aspx ...


1

Seems this is a bit tricky as SharePoint uses the modified by field for the poster. There's two ways I could see this working. I don't know XSL well enough to advise you on creating an XSL template and injecting it into the web part, but seeing as this is an xslt web part you presumably could do this and return whatever value you want in any area. You may ...


1

I think what you want is outside the scope of what SP intends Approval to mean. Create your own column with Approved, Pending, Rejected radio buttons.


1

The following example demonstrates how to approve items selected in List View via JSOM function approveItems(success,error) { var context = SP.ClientContext.get_current(); var listId = SP.ListOperation.Selection.getSelectedList(); var list = context.get_web().get_lists().getById(listId); var selectedItems = ...



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