nerdexam
Microsoft

70-573 · Question #214

You have a SharePoint farm that has more than 100 custom Features. You upgrade several Features in the farm. You need to ensure that the site collection uses the most up-to-date versions of the…

The correct answer is A. Dim webServices As New SPWebServiceCollection(SPFarm.Local). MNEMONIC RULE: "large chunk of code, SPFeatureScope.Site" Since we are working with the site collection, we need to use SPFeatureScope.Site, not SPFeatureScope.Web. needsUpgrade (Boolean): if true, only features that need to be upgraded are included. If false, only featuresthat…

Developing SharePoint Solutions

Question

You have a SharePoint farm that has more than 100 custom Features. You upgrade several Features in the farm. You need to ensure that the site collection uses the most up-to-date versions of the Features. Only Features that require an upgrade must be evaluated. Which code segment should you use?

Options

  • ADim webServices As New SPWebServiceCollection(SPFarm.Local)
  • BDim webServices As New SPWebServiceCollection(SPFarm.Local)
  • CDim site As SPSite = SPContext.Current.Site
  • DDim web As SPWeb = SPContext.Current.Web

How the community answered

(27 responses)
  • A
    81% (22)
  • B
    7% (2)
  • C
    7% (2)
  • D
    4% (1)

Explanation

MNEMONIC RULE: "large chunk of code, SPFeatureScope.Site" Since we are working with the site collection, we need to use SPFeatureScope.Site, not SPFeatureScope.Web. needsUpgrade (Boolean): if true, only features that need to be upgraded are included. If false, only featuresthat do not need to be upgraded are included. SPSite.QueryFeatures Method (Guid, Boolean)

Topics

#Feature upgrade#SPWebServiceCollection#SPFarm#Feature management

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice