PrepAway - Latest Free Exam Questions & Answers

You need to add custom actions to the Products list by …

Adventure Works uses SharePoint to store product and order information.
Product managers visit the Products list to see the status of each product. They request a feature that will allow
them to easily see the recent and old product orders without opening the Products list. The products orders
page is located at /sitepages/productorders.aspx, and the product order history page is located at /sitespages/
productordershistory.aspx. Both pages require a query string parameter named ProductID.
You need to add custom actions to the Products list by using the least amount of administrative effort.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Add an empty element to the SharePoint project. Add a <CustomAction> tag, set the Location element to
EditControlBlock, and then use the <UrlAction> tag for a redirect to the custom page.

B.
Create a Windows Application and add a reference to Microsoft.SharePoint.Portal.CustomActions.dll and
use the SPCustomActions class to add a custom action.

C.
Open the site in SharePoint Designer. Create a custom List Item Display Template and then apply it to the
Products List View Web Part.

D.
Create a visual Web Part. Use a grid view with a template column and hyperlink, and databind the Products
list. Add the Web Part to the allItems.aspx page of the Products list.

Explanation:
1. To add a menu item custom action feature to the app for SharePoint project Right-click the app for
SharePoint project, and add a new Menu Item Custom Action item.
2. Select the host web to expose the custom action and choose a list template and custom list as custom action
scope to then click on Next button.
3. Enter the menu item text you want to show and page in App where you want to redirect when the userselects the Menu item then click on the Finish button.
Example:

Note: When you are creating an app for SharePoint, custom actions let you interact with the lists and the ribbon
in the host web. A custom action deploys to the host web when end users install your app. Custom actions can
open a remote webpage and pass information through the query string. There are two types of custom actions
available for apps: Ribbon and Menu Item custom actions.
Custom actions in SharePoint 2013


Leave a Reply