PrepAway - Latest Free Exam Questions & Answers

Category: 70-573 (v.1)

Exam 70-573: TS: Microsoft SharePoint 2010, Application Development (update October 30th, 2015)

Which code segment should you add at line 03?

You have a list named Projects that contains a column named ClassificationMetadata. You need
to create a Web Part that updates the ClassificationMetadata value to NA for each item in the
Projects list. You write the following code segment. (Line numbers are included for reference
only.) 01 foreach (SPListItem currentItem in SPContext.Current.Web.Lists[“Projects”]. Items) 02 {
03 04 } Which code segment should you add at line 03?

You need to ensure that all users can use the Web Part to update the description of the current site

You create a Web Part that programmatically updates the description of the current SharePoint
site. The Web Part contains the following code segment. (Line numbers are included for reference
only.) 01 SPSecurity.RunWithElevatedPrivileges(delegate() 02 { 03 SPSite currSite =
SPContext.Current.Site; 04 SPWeb currWeb = SPContext.Current.Web; 05 using (SPSite eSite =
new SPSite(currSite.ID)) 06 { 07 using (SPWeb eWeb = eSite.OpenWeb(currWeb.ID)) 08 { 09

eWeb.AllowUnsafeUpdates = true; 10 currWeb.Description = “Test”; 11 currWeb.Update(); 12
eWeb.AllowUnsafeUpdates = false; 13 } 14 } 15 }); Users report that they receive an Access
Denied error message when they use the Web Part. You need to ensure that all users can use the
Web Part to update the description of the current site. What should you do?

Which code segment should you add at line 05?

You create a Web Part. You need to display the number of visits to a SharePoint site collection in
a label named LblVisits. You write the following code segment. (Line numbers are included for
reference only.) 01 SPSecurity.RunWithElevatedPrivileges(delegate() 02 { 03 try 04 { 05 06
LblVisits.Text = site.Usage.Visits.ToString(); 07 } 08 finally 09 { 10 11 } 12 }); Which code segment
should you add at line 05?

What should you add to the schema of the action?

You are creating a custom workflow action to be used in Microsoft SharePoint Designer reusable
workflows. The action programmatically creates a SharePoint site named Site1 at a specific URL.
The workflow actions schema file contains the following code segment. <WorkflowInfo> <Actions
Sequential=”then” Parallel=”and”> <Action Name=”Create Site”
ClassName=”SPDActivityDemo.CreateSite” Assembly=”SPDActivityDemo, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=1a4a7a2c3215a71b” AppliesTo=”all” Category=”Test”>
<Parameters> <Parameter Name=”Url” Type=”System.String, mscorlib” Direction=”In” />
<Parameters> </Action> </Actions> </WorkflowInfo> You need to ensure that users can specify
the URL property of the action in SharePoint Designer. What should you add to the schema of the
action?


Page 24 of 24« First...10...2021222324