What should you create?
You have a SharePoint solution that contains a custom site column and a custom content type.
You need to add the custom site column as a lookup field for the custom content type. What
should you create?
Which URL should you choose?
You create two custom lists named Offices and Rooms. Rooms has the following columns: Title
Capacity Equipment Offices has the following columns: Title Rooms (a lookup to the Title column
in the Rooms list) Rooms: Capacity Rooms: Equipment You need to perform a Representational
State Transfer (REST) query that returns a list of all the offices that have rooms with a capacity of
10. The query results must include the room titles and the equipment in each room. Which URL
should you choose?
You need to delete the previous versions of all documents in a document library
You need to delete the previous versions of all documents in a document library. The deleted
versions of the documents must be retained in the SharePoint Recycle Bin. What should you do?
Which code segment should you add at line 04?
You need to create a Web Part that displays all content created by a specific user. You write the
following code segment. (Line numbers are included for reference only.) 01 privace void
keywordQueryExecute (string searchAuthor ) 02 { 03 KeywordQuery kRequest = new
KeywordQuery ( ServerContexc.Current ) ; 04 05 kPequest.QueryText = strQuery ; 06
ResultTableCollection resultTbls = kRequest.Execute () ; 07 } Which code segment should you
add at line 04?
Which code segment should you add at line 03?
You need to create a Web Part that adds a term set to the current SharePoint site collection’s
term store. You write the following code segment. (Line numbers are included for reference only.)
01 TaxonomySession session = new TaxonomySession ( SPContext.Current..Site ) ; 02 TermSet
addedTerm = session.TermStores [O] .Groups [” MyNewTermStore “] . CreateTermSet (
txtBoxTermSetToAdd.Text ) ; 03 Which code segment should you add at line 03?
You need to create a custom content type and specify the content type ID
You need to create a custom content type and specify the content type ID. What should you do?
You need to ensure that you can access the list by using strongly-typed objects in Microsoft Visual Studio 201
You plan to create a custom Web Part that displays items from a custom SharePoint list named
Project. You need to ensure that you can access the list by using strongly-typed objects in
Microsoft Visual Studio 2010. What should you do first?
Which access method should you use?
You have a SharePoint site collection that contains 100 sites. Each site contains 100 lists. You
need to retrieve all item titles from all lists. The data must be retrieved in the minimum amount of
time. Which access method should you use?
Which code segment should you add at line 09?
You have a SharePoint site collection that has the URL http://contoso/sites/finance. You are
creating a Microsoft .NET Framework console application that will use the SharePoint client object
model to create a site in the site collection. The application contains the following code segment.
(Line numbers are included for reference only.) 01 ClientContext cCtx = new
ClientContext(“http://contoso/sites/finance”); 02 Web root = cCtx.Site.RootWeb; 03
cCtx.Load(root); 04 WebCreationInformation webInfo = new WebCreationInformation(); 05
webInfo.Title = “site1”; 06 webInfo.Url = “site1”; 07 webInfo.WebTemplate = “MPS#2”; 08
root.Webs.Add(webInfo); 09 10 cCtx.Dispose(); You need to ensure that the application creates
the site. Which code segment should you add at line 09?
Which code segment should you add at line 19?
You create a Web Part that queries a list. The Web Part contains the following code segment.
(Line numbers are included for reference only.) 01 protected override void Render(
HtmlTextWriter writer) 02 { 03 SPUserToken spInToken = GetTheContext (
SPContext.Current.Site ) ; 04 using (SPSite aSite = nera SPSite ( curSiteCtx.ID , spInToken ) ) 05
{ 06 07 } 08 } 09 private SPUserToken GetTheContext ( SPSite nUeb ) 10 < 11
nWeb.CatchAccessDeniedException = false; 12 SPUserToken spToken = null; 13 try 14 { 15
spToken = nWeb.SystemAccount.UserToken ; 16 } 17 catch ( UnauthorizedAccessException ) 18
{ 19 20 } 21 return spToken; 22 } You need to ensure that users without permissions to the list can
view the contents of the list from the Web Part. Which code segment should you add at line 19?