Topic 2, ABC.comBackground
You are employed as a developer at ABC.com. ABC.com is a company that supplies computer
hardware to clients at wholesale and retail pricing. ABC.com’s has a SharePoint farm
configuration, with an intranet site configured for ABC.com staff, and an extranet site configured
for ABC.com clients. ABC.com wants clients to have the ability to request explicit products, and
have direct payment access.
Business Prerequisites
ABC.com’s central enterprise site must be configured to include multiple site collections. The site
documents’ appearance and effect should be of a reliable nature.
Any new features should allow for the primary version to support the inclusion of the latest
processes when being upgraded.
Technical Prerequisites
A site level Document content type, which includes two site columns named Client Name and
Transaction Date. The site level Document content type must be named Finance.
Two further content types, which derive from Finance, should be created. The derived content
types will be named Purchase Information and Payment Verification.
Whenever documents are created, workflows connected to document content types should be
started. An e-mail notification should be sent to clients as soon as Payment Verification
documents are created.
Clients who purchase in bulk, should be allocated to a custom role, named Bulk. A custom
permission level that appends the ViewPages permission to the current base permissions, should
be configured and attached to Bulk user role. Unknown users should be allowed to browse the site
with controlled access to resources.
The web application has been created with anonymous access enabled.
Users are prompted for credentials when they browse to the site.
Industry best practices must be observed for the versioning of the solution artifacts. A new site
column named Department must be programmatically included to the Finance content type during
a future upgrade. A single version of an assembly should be presented at runtime.
Direct deployment of code based hot fixes to the Global Assembly Cache on all SharePoint
servers should be allowed. Content should be accessible during maintenance periods, but should
not be altered.
The SharePoint environment should be returned to the latest date when hardware failure occurs,
without reducing system execution.
When SPSite objects go out of scope, they should immediately be removed from memory.
All processes should be automated, wherever possible, via Windows PowerShell.
****************************************************
You are writing code to generate the necessary site columns.
Which of the following is a method that should be included in the code?
A.
The GetField method.
B.
The GetFieldByInternalName method.
C.
The AddLookup method.
D.
The AddFieldAsXml method.
Explanation:
You are writing code to *generate* the necessary site columns. AddFieldAsXml is the only method that makes sense.
https://msdn.microsoft.com/en-us/library/office/ms457586.aspx
AddFieldAsXml is the right answer
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldcollection.addfieldasxml.aspx