Q1. - (Topic 2)
You need to configure navigation for the site.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A. Create simple links or headers for new pages.
B. Create friendly URLs for new pages automatically.
C. Add unique identifiers to new pages.
D. Create term-driven pages with friendly URLs.
E. Add new pages to navigation automatically.
Answer: A,B,D
Explanation:
D: Scenario: Navigational links across the top should be driven by the term store and use URLs that will improve search engine ranking.
A: Simple links:
The HR node is configured with a link to a page the user will be taken to when clicking on the menu item:
BD: Enable Managed Navigation
This page allows you to select managed navigation for your global and current navigation.
Under Site Settings / Look and Feel click on Navigation.
Other settings on this page allow you to define the term set that will be used for navigation terms and if new pages created should be added to the term set automatically. You can also specify if friendly URL's should be created automatically.
Reference: Term based navigation in SharePoint 2013;SharePoint 2013 – Friendly URLs and Managed Navigation
Q2. - (Topic 5)
You create a cloud-hosted SharePoint app.
You must make the app available in the SharePoint Store for customers to install on their host webs.
You need to keep the style and navigation of the app the same as the host web of the app after it is installed by any customer.
What should you do?
A. Use an app template and an app.master master file for branding.
B. Add a reference to SP.UI.Controls.js on the host web. Pass the AppUrl parameter to the host web. Apply branding to the host web.
C. Add a reference to the SP.UI.Controls.js file located in the new /_layouts/15 directory. Pass the HostUrl parameter to the start page of the app. Use the Chrome control in the HTML page in a declarative manner.
D. Use a Chrome control to find the differences in the styles between the host web and the app. Resolve all of the differences by using JavaScript.
Answer: C
Explanation: Microsoft allows developers to import a very basic version of the SharePoint 2013 chrome into their apps without having to manually create matching HTML controls.
The functionality for this can be found in the SP.UI.Controls.js file located in the new /_layouts/15 directory. To use the chrome control, first add a reference to SP.UI.Controls.js (make sure you've already loaded the requisite JQuery files and other dependencies), then add an empty <div> to your page markup at or near the top of the page.
Reference: Using the Chrome Control in SharePoint 2013 Apps
Q3. DRAG DROP - (Topic 5)
Contoso. Ltd. uses SharePoint for document sharing, task management, and workflows. Contoso, Ltd has a SharePoint portal with a URL of intranet.contoso.com. The portal has 5,000 subsites. It is used by 50,000 users.
You develop a custom web level feature that allows users to see their tasks from every website on the portal.
You need to use a Windows PowerShell script to enable the web level feature in the subsites without adversely impacting the performance of the server.
You have the following script:
Which values should you include in Target 1, Target 2, Target 3 and Target 4 to complete the script? (To answer, drag the appropriate values to the correct targets in the answer area. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q4. HOTSPOT - (Topic 5)
You develop a SharePoint app that companies use to track and submit employee expenses.
You must create two versions of the app. VersionA is highly customized for a specific client. VersionB has reduced functionality and must be available to the general public.
You need to publish the apps.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Answer:
Q5. - (Topic 5)
Adventure Works uses a SharePoint publishing site to host their public-facing website at http://www.adventureworks.com. The website gives external users the ability to register and sign in to the site to buy Adventure Works products.
You notice that publicly registered users see the SharePoint ribbon.
You need to ensure that the SharePoint ribbon is available only to content authors and administrators.
What should you do?
A. Open the current site master page in SharePoint Designer, place the SharePoint:SPSecurityTrimmedControl control around the div tag with the s4-ribbonrow ID. Set the PermissionsString to ManageSubWeb.
B. Open the current site master page in SharePoint Designer, find a div tag with the s4-ribbonrow ID, and then remove all of the contents of the div.
C. Open the current site master page in SharePoint Designer and then place the SharePoint:SPSecurityTrimmedControl control around the div tag with the s4-ribbonrow ID. Set the PermissionsString to AddAndCustomizePages.
D. In the SharePoint project, add an Empty Element and then use the <HideCustomAction> tag to hide the ribbon.
Answer: C
Explanation: If you designed a custom master page for your SharePoint 2010 and the
ribbon is in your way, SharePoint has a built-in control that lets you hide it from anonymous
users in few easy steps. Open and check-out your master page, find where your ribbon
control starts or look for <WebPartPages:SPWebPartManager id=”m” runat=”Server”/>.
Place this control below <Sharepoint:SPSecurityTrimmedControl runat=”server”
Permissions=”AddAndCustomizePages”>. Find where your ribbon control ends or look for
<div id=s4-workspace> and place the closing control above it
</SharePoint:SPSecurityTrimmedControl>. Save, check-in the master page and publish it
to see the changes. From now on, only logged in users with the right permissions will be
able to see the ribbon on the top.
Incorrect:
Not A: Permission should be set to AddAndCustomizePages not ManageSubWeb.
Reference: SharePoint, Hide the Ribbon from Anonymous Users
Q6. - (Topic 4)
You implement the dependency changes based on the requirements for the Litware web artifacts feature.
When you deploy the Litware.Intranet.Templates.wsp package, you receive an error message.
You need to ensure that the package deploys successfully.
What should you do?
A. Set the scope of the Litware web artifacts feature to SPSite.
B. Set the scope of the Litware web artifacts feature to SPFarm.
C. Set the Is Hidden option of the Litware web artifacts feature to False.
D. Set the Auto Activate in Central Admin parameter of the Litware web artifacts feature to True.
Answer: C
Explanation:
Scenario: Litware.Intranet.Templates contains the LitwareWebArtifacts hidden feature which contains code required to run after the provisioning is completed.
Q7. - (Topic 5)
You have an app named TaskManagerApp that is published at
http://sharepoint.contoso.com/apps.
You need to remove the app and ensure that users will no longer be able to use the app.
Which Windows PowerShell cmdlets should you run?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation: * Get-SPAppInstance
Use the Get-AppInstance cmdlet to get a collection of app instances that are installed on
an SPWeb object.
*Uninstall-SPAppInstance
Use the Uninstall-SPAppInstance cmdlet to uninstall an instance of an app. This cmdlet is
required to be run before a migration process.
-------------EXAMPLE--------------
$instance = Get-SPAppInstance -AppInstanceId $instance.Id
Uninstall-SPAppInstance -Identity $spapp
This example uninstalls an instance of an app.
Incorrect:
Not B, not D: get-SPWebApplication
The Get-SPWebApplication cmdlet returns all Web applications that match the scope given
by the Identity parameter. The Identity can be the name of the name, URL, or GUID of the
Web application. If no Identity is specified, all Web applications are returned.
EXAMPLE 1----------------------
$w = Get-SPWebApplication http://sitename
This example gets the Web application for http://sitename and stores it in a variable.
Not C: Disable-SPFeature
The Disable-SPFeature cmdlet disables a SharePoint Feature at the given scope.
Reference: Uninstall-SPAppInstance
Q8. DRAG DROP - (Topic 5)
You develop a SharePoint app to access data contained in a hosted SharePoint site.
You need to authorize the app to access the list items in a custom list on the host website.
You have the following code:
Which code segments should you include in Target 1, Target 2, Target 3, Target 4, Target 5 and Target 6 to complete the code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content)
Answer:
Q9. - (Topic 2)
You receive an error when you deploy the app.
You need to resolve the error.
What should you do?
A. Create a deployment package and upload the app to the app catalog in SharePoint.
B. Enable side-loading of apps in the app manifest.
C. Deploy the app to https://contoso-my.sharepoint.com.
D. Enable side-loading of apps in the Visual Studio project properties.
Answer: A
Explanation: We should deploy the app to the Development site, that is https://contoso.sharepoint.com/tasks (see Existing Site Configuration in scenario).
Note:
* Loading Apps directly from Visual Studio only works if the destination is a Developer site. That form of distribution, called side loading, is only used when testing and debugging an App. To load an App in a regular site you need to add the .App package produced in Visual to the App Catalog site that is associated with your Web Application. From there you will be able to load the app using the Site Contents link in your site.
* Issue: While we try creating a SharePoint 2013 App in a SharePoint hosted model and when we try to deploy the solution, we get an “Error occurred in deployment step ‘Install app for SharePoint’: Side loading of apps is not enabled on this site.
Solution:
1. That is, while creating a site collection/site where you want to deploy the app, create it using the “Developer Site” template under the Collaboration tab.
2. Always the app should be published/deployed to the developer site (A site collection with the Developer Site Template). And from this developer site you can add the App to your SharePoint site
Scenario: Pending Issues
When you deploy the app from Visual Studio 2012, you receive the error: "Error occurred in de-ployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site."
Reference: Side Loading of apps is not enabled on this site error while installing app in SharePoint 2013
Q10. DRAG DROP - (Topic 5)
You need to retrieve data about all the lists in a site by using the REST (Representational State Transfer) API.
You have the following code:
Which code segments should you include in Target 1 and Target 2 to complete the code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer: