Bulk/Batch Approval/Rejection in a SharePoint 2010 library


My client had the requirement to bulk approve or reject items in a document library or list.  Using document sets wasn’t the solution as the only thing they had in common was that they all need to be approved at the same time.

I found this excellent solution from Sohel’s blog which was almost perfect…

http://ranaictiu-technicalblog.blogspot.co.nz/2011/05/sharepoint-2010-approvereject-multiple.html

It handles workflow if they are running which other solutions I found didn’t.  One limitation was that it only worked for document libraries, not lists.

All I needed to do was update the elements file to below and I had it on both document libraries and lists.

<?xmlversion=1.0encoding=utf-8?>

<Elementsxmlns=http://schemas.microsoft.com/sharepoint/>

<CustomAction

Id=COB.SharePoint.Ribbon.NewControlInExistingGroup

Location=CommandUI.Ribbon

RegistrationType=ContentType

RegistrationId=0x01>

<CommandUIExtension>

<CommandUIDefinitions>

<CommandUIDefinitionLocation=Ribbon.ListItem.Workflow.Controls._children>

<ButtonId=COB.SharePoint.Ribbon.NewControlInExistingGroup.Notify

Command=COB.Command.NewControlInExistingGroup.Notify

Sequence=21

Image16by16=/_layouts/$Resources:core,Language;/images/formatmap16x16.png

Image16by16Top=-48Image16by16Left=-240

Image32by32=/_layouts/$Resources:core,Language;/images/formatmap32x32.png

Image32by32Top=-448Image32by32Left=-384

Description=Uses the notification area to display a message.

LabelText=Approve/Reject Selection

TemplateAlias=o1

/>

</CommandUIDefinition>

<CommandUIDefinitionLocation=Ribbon.Documents.Workflow.Controls._children>

<ButtonId=Ribbon.Documents.Workflow.ApproveDoc

Alt=Approve multiple items

Command=COB.Command.NewControlInExistingGroup.Notify

LabelText=Approve/Reject Selection

Image16by16=/_layouts/$Resources:core,Language;/images/formatmap16x16.png

Image16by16Top=-48Image16by16Left=-240

Image32by32=/_layouts/$Resources:core,Language;/images/formatmap32x32.png

Image32by32Top=-448Image32by32Left=-384

TemplateAlias=o1

/>

</CommandUIDefinition>

</CommandUIDefinitions>

<CommandUIHandlers>

<CommandUIHandler

Command=COB.Command.NewControlInExistingGroup.Notify

EnabledScript=javascript:enableApprovalAll();

CommandAction=javascript: showApproveAll();

/>

</CommandUIHandlers>

</CommandUIExtension>

</CustomAction>

<CustomAction

Id=COB.Command.NewControlInExistingGroup.Notify.Script

Location=ScriptLink

ScriptSrc =/_layouts/SharePoint.ApproveRejectTest/Scripts/ApproveReject.js/>

</Elements>

Advertisements

About SharePoint Surfer

A SharePoint professional working in local council, experiencing the pointy end of SharePoint.

Posted on March 5, 2012, in approval, Content Deployment, SharePoint and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: