You need to ensure that the application queries Shared Documents for a document

You need to ensure that the application queries

This preview shows page 3 - 6 out of 10 pages.

You need to ensure that the application queries Shared Documents for a document named Doc1.docx. Which code element should you add at line 09? A. <FieldRef Name='FileDirRef'/> B. <FieldRef Name='FileLeafRef'/> C. <FieldRef Name='FileRef'/> D. <FieldRef Name='File_x0020_Type'/> Answer: B Explanation: MNEMONIC RULE: "FileLeafRef; documents are made out of Leaves" Identifies a field that contains information about the server-relative URL for the file node that is associated withthe specified SharePoint Foundation object. SPBuiltInFieldId.FileLeafRef Field
Image of page 3
- us/library/microsoft.sharepoint.spbuiltinfieldid.fileleafref.aspx QUESTION: 165 You have a document library named MyDocs. MyDocs has a column named Column1. Column1 is a required column. You discover that many documents are checked out because users fail to enter a value for Column1. You need to create a Web Part to delete the documents. Which code segment should you include in the Web Part? A. foreach (SPCheckedOutFile file in ((SPDocumentLibrary)SPContext.Current.Web. Lists["MyDocs"]).CheckedOutFiles) { file.Delete(); } B. foreach (SPItem file in SPContext.Current.Web.Lists["MyDocs"].Items) { if ((file("CheckOutStatus") == "CheckOut")) { file.Delete(); } } C. foreach (SPListItem file in ((SPDocumentLibrary)SPContext.Current.Web.Lists ["MyDocs"]).Items) { if ((file("CheckOutStatus") == "CheckOut")) { file.Delete(); } } D. foreach (SPCheckedOutFile file in ((SPDocumentLibrary)SPContext.Current.Web. Lists["MyDocs"]).CheckedOutFiles) { file.TakeOverCheckOut(); } Answer: A Explanation: MNEMONIC RULE: "SPCheckedOutFile, file.Delete()" Represents a checked-out file in a document library or workspace. SPCheckedOutFile Class QUESTION: 166 You need to create a Web Part that adds a term set to the current SharePoint site
Image of page 4
collection's term store. You write the following code segment. (Line numbers are included for reference only.) 01 System.Web.UI.WebControls.TextBox txtBoxTermSetToAdd = new System.Web.UI. WebControls.TextBox(); 02 TaxonomySession session = new TaxonomySession(SPContext.Current.Site); 03 TermSet addedTerm = session.TermStores[0].Groups["MyNewTermStore"]. CreateTermSet(txtBoxTermSetToAdd.Text); 04 Which code segment should you add at line 04? A. addedTerm.Export(); B. addedTerm.TermStore.CommitAll(); C. SPContext.Current.Site.WebApplication.Update(); D. SPContext.Current.Web.AllowUnsafeUpdates = true; Answer: B Explanation: MNEMONIC RULE: "add a term set = TermStore.CommitAll()" Term Class QUESTION: 167 You need to create a Web Part that displays all social tags entered by users. Which code segment should you use? A. TaxonomySession session = new TaxonomySession(SPContext.Current.Site); TermSet socialTags = session.DefaultKeywordsTermStore.SystemGroup.TermSets ["Keywords"]; B. TaxonomySession session = new TaxonomySession(SPContext.Current.Site); TermSet socialTags = session.DefaultKeywordsTermStore.SystemGroup.TermSets ["Tags"]; C. TermSet socialTags = (TermSet)SPContext.Current.Site.WebApplication.Properties ["Tags"]; D. TermSet socialTags = (TermSet)SPContext.Current.Web.AllProperties["Keywords"]; Answer: A Explanation: MNEMONIC RULE: "TaxonomySession, TermSets["Keywords"]" TermSetCollection Members - us/library/microsoft.sharepoint.taxonomy.termsetcollection_members.aspx IndexedCollection<T>.Item Property (String) - us/library/ee580616.aspx
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 10 pages?

  • Spring '18
  • Dr. Moez
  • 70-573-VB Testking, Certqueen 70-573-VB, 70-573-VB Discount Coupon, 70-573-VB Promo Code, Free 70-573-VB Vce

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes