70-542 - TS: Microsoft Office SharePoint Server 2007 - Application Development

Go back to Microsoft

Example Questions

Your Microsoft SQL Server 2005 database contains client records. You create a Business Data Catalog (BDC) definition that allows you to view the client information. You create a Web Part that displays a map of the location of the selected client. You need to ensure that you can create a custom action to link to the Web part. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) You create a service center site for a SharePoint portal. You need to display a new column named "Completion Date" on a Search Core Results Web Part. Which two steps should you perform? (Each answer represents part of the solution, select two) You are creating a Microsoft Office SharePoint Server 2007 site. The site contains content that is relevant to members of the DOMAIN\Developers security group. You need to ensure that the content is targeted to members of the Developers group. What should you do? Your company uses an external CRM application that contains a business object named Customers. The Customers object represents a table that contains customer details. You need to define the Customers object in the Business Data Catalog (BDC) definition. What should you do? You create an application for a Microsoft Office SharePoint Server 2007 server. You need to write code that retrieves all users for an audience named Audience1. Which code segment should you use? You are designing a MOSS 2007 solution. You need to implement a Single Sign-On (SSO) provider to access a Business Data Catalog (BDC). What should you do? You have a Microsoft SQL Server 2005 database that contains client records. You create a BDC definition that allows you to view the client information. You create a web part that displays a map of the location of the selected client. You need to ensure that you can create a custom action to link the web part. Which two actions should you perform? (Each answer represents part of the solution. Choose two.) You create an application for a Microsoft Office SharePoint Server 2007 server. You create a List Web Part that displays tasks in a project plan. The Web Part retrieves information from the Business Data Catalog (BDC) definition. You need to ensure that when a user selects an item in the project list, the task list for the project is displayed. You also need to ensure that users can update information in the task list. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) You have a Publishing site. You customize the default edit page toolbar. You need to add a new button to the toolbar. Which class should you implement? You create an application from Microsoft Office SharePoint 2007 Server. You need to write code that retrieves all users for an audience named Audience1. Which code segment should you use? You create a Microsoft Office SharePoint Server 2007 site. You are creating a custom field control that displays a video. The custom field must perform the following tasks: Render the control properly when the page is in display mode. Enable a user to select an appropriate video for display when the page is in edit mode. You need to ensure that the custom field meets the outlined requirements. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) You create an application that contains the following code segment: 01: Private Sub ModifyCellPhonePrivacy(Byval currentProfile As String) 02: Dim userProfile As New UserProfile.UserProfileServices() 03: Dim cellData as userProfile.PropertyData() = New userProfile.PropertyData(0)~~ 04: cellData(0) = New userProfile.PropertyData() 05: cellData(0).Name = "Cell Phone" 06: 07: userProfile.ModifyUserPropertyByAccountName(currentProfile, cellData) 08: End Sub You need to set the privacy of the cell phone value to only me for all user profiles. Which code segment should you use at line 6? You implement a custom function as a user-defined function (UDF) in Excel Services in Microsoft Office SharePoint Server 2007. A Microsoft Office Excel 2007 workbook uses the custom function to generate a random number between 100 and 500. You need to generate a new random number each time you load the workbook. Which code segment should you use? You have a custom windows form application. You plan to create a feature that will perform a key word search of a SharePoint site. You create a feature that contains the following code: 01: Dim keyWordString as String = "Microsoft" 02: dim queryXMLString as String = ("<QueryPacket xmlns = 'urn:Microsoft.Certs.Query'>"& 03: ... 04: QuerySearch 05: Dim queryService as New QueryWebServiceProxy.QueryService() 06: queryService.Credentials = System.Net.CredentialsClass.DefaultCredentials 07: Dim queryResults as System.Data.DataSet = queryService.QueryEx(queryXMLString) 08 ResultsGridView.DataSource = queryResults.Tables(0) You need to ensure that the search returns valid results. Which code segment would you put a line 3? You create a Microsoft Office SharePoint Server 2007 portal site. The site contains a document retention policy for request for proposal (RFP) documents. You need to customize the policy to ensure that a notification is sent to each project manager when the RFP date expires. What should you do? You need to programmatically target a web part to an audience. What should you use? You are modifying a Microsoft Office SharePoint Server 2007 Search Center site. You create a customized XSLT style sheet. You change the parent of 10 core search result web parts on separate site tabs. You need to ensure that the web parts use the new style sheet. There are two possible ways to achieve this goal. (Each answer represents a complete solution. Choose two.) You are modifying a Microsoft Office SharePoint Server 2007 Search Center site. You create a customized XSLT style sheet to change the appearance of ten Search Core results Web Parts on separate site tabs. You need to ensure that the Web Parts use the new style sheet. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.) You are creating a site on a SharePoint 2007 server. You write the following code segment: 01: Public Function GetUserProperties() As String 02: Dim usersWithNoTitles as String = New String("") 03: Dim site as SPSite = new SPSite("http://sitename") 04: Try 05: Dim web as SPWeb = site.OpenWeb 06: Try 07: Dim profMan as UserProfileManager = New UserProfileManager 08: ... 09: Finally 10: CType(web.iDisposable).Disposable() 11: End Try 12: Finally 13: CType(site.iDisposable).Disposable() 14: End Try 15: Return usersWithNoTitles 16: End Function You need to display a list of users in the site who have blank titles. Which code segment should you use? You are designing a Microsoft SharePoint 2007 solution. You create a workbook that will access data from a custom Microsoft Office InfoPath task form. Which two actions should you perform? (Each action represents part of the solution, select two) You have a document library that contains .docx documents. You need to create a web part that allows users with the ability to convert documents to .aspx pages by using the default document converter. You write the following code segment: 01: Public Sub ConvertFileOpen(ByVal file as SPFile) 02: Dim pubWeb as PublishingWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Web) 03: Dim pages as PublishingWebCollection = pubWeb.GetPublishingPages() 04: Dim title[String] = GUID.NewGUID().toString() & ".aspx" 05: Dim converterID as new GUID("1234.........7890") 06: 07: End Sub Which code segment should you add at line 6? User Profiles in your SharePoint farm contain the job title property. The job title property contains the user job title. You have an audience defined for the Sales department. The audience contains a rule. You create a custom application that contains the following code segment: 01: Using site as New SPSite.Open("http://intranet") 02: Dim context as ServerContext = ServerContext.GetContext(site) 03: Dim audienceMgr as New AudienceManager(context) 04: Dim audienceColl as AudienceCollection = audienceMgr.Audiences 05: Dim salesDepartmentAudience as Audience = audienceColl.Open("SalesDepartment") 06: Dim salesDepartmentRules as ArrayList = salesDepartmentAudience.AudienceRules 07: 08: 09: 10: 11: salesDepartmentAudience.AudienceRules = salesDepartmentRules 12: salesDepartmentAudience.Commit() 13: End Using You need to change the audience to include only the users that have the job title set to Manager. Which code segment should you add? You manage a SharePoint 2007 Server site that contains a site group named HR. You create an audience that consists of members of the HR group. The HR group does not have design permission levels on the web part gallery of the site. You need to target a list item to HR employees. What should you modify? You create a Microsoft Office SharePoint Server 2007 site. The site is configured to use a Shared Services Provider (SSP) that manages user profiles. The user profiles contain user contact information. You need to retrieve the telephone number of a user. What should you do? You have a Records Center site. You need to create a custom file plan for documents based on their content type. What should you do? Your organization has a Microsoft Office Forms Server 2007 server. The server hosts a form template named TemplateA. You create a new version of the form named TemplateB. You need to create an automated administration task that ensures that the sites use TemplateB instead of TemplateA. What should you do? You are creating two user-defined functions (UDFs) of Excel Services in Microsoft Office SharePoint Server 2007. You write the following code segment. public class Class1 { public double MyDouble (double d) { return d * 9; } public DateTime ReturnDateTimeToday () { return ( DateTime.Today ); } } You need to ensure that the MyDouble method and the ReturnDateTimeToday method are recognized as UDFs of Excel Services. What should you do? Your company uses an ASP.NET Web site. You create a Microsoft Office InfoPath form named MyForm. You are creating a custom control that is derived from the XMLFormView class. The custom control will display MyForm within an ASP.NET page on the Web site. You need to ensure that MyForm can be displayed within an ASP.NET page on the Web site. What should you do? Your company stores product information in a Microsoft SQL Server 2005 database. You create a Business Data Catalog (BDC) definition to search for product information within the database. You need to ensure that incremental crawls can be performed in the database for indexing. What should you do? You are creating a Microsoft Office SharePoint Server 2007 application to increase the search capability of five site collections that belong to a single farm. You need to retrieve all available search contexts for the Web site collection on which the application is initiated. Which code segment should you use? You create a Windows Form application that accesses Excel web services and displays workbook data on the form by using the GetWorkbook method. You need to identify the items that the workbook author selected as viewable when he saved the workbook. Which parameter should you pass to the GetWorkbook method? You have a data connection library. You need to ensure that users can create and display Microsoft Office Excel workbooks that use data sources stored in the data connection library. Where should you add the data connection library? You have an audience for the Marketing Department. You plan to target all web parts on the default.aspx web page to the Marketing Department. You write the following code segment. 01: Using wpm as SPLimitedWebPartManager = objSite.GetLimitedWebPartManager ("default.aspx", System.Web.UI.WebControls.WebPart.PersonalizationScope.[Shared]) 02: Dim AM as New AudienceManager(ServerContext.Current) 03: For Each currentWP as WebPart in wpm.WebParts 04: currentWP.AuthorizationFilter = String.Format ("~0~",AM.GetAudiences("Marketing").AudienceID) 05: 06: Next 07: 08: End Using You notice that all users still have access to the web parts on the default.aspx web page. You need to ensure that only users in the Marketing Audience can see the web part on default.aspx. What should you do? You create a Microsoft Office SharePoint 2007 Portal site. The site contains a document retention policy for Request for Proposal (RFP) documents. You need to customize the policy to ensure that a notification is sent to each manager when the RFP date expires. What should you do? You plan to import SharePoint user profiles from a LDAP directory. You create a custom application that contains the following code segment: 01: Using site as new SPSite("http://localhost") 02: Dim context as ServerContext = ServerContext.GetContextc(site) 03: Dim userProfileManager as New UserProfileManager(context) 04: Dim userProfileConfigManager as New UserProfileConfigManager(context) 05: userProfileConfigManager.ActivateImport(True) 06: 07: End Using You run the code segment. You notice the user profiles are not imported. You need to ensure that when the code segment runs, the SharePoint profiles are imported from the LDAP directory. Which code segment should you add at line 06? You need to implement a custom feature that audits content in a SharePoint site. Which interface should you implement? You need to display the contents of a SharePoint list named "Assets" in a Microsoft Office Excel spreadsheet and then publish the spreadsheet to Excel Services. What should you do? You create a Microsoft Office InfoPath form library. You need to provide users with the ability to convert new forms to web pages on demand. You must use an existing document converter. Which code segment would you use? You have a publishing site. You plan to add an article page to a site by using a console application. You create a console application that contains the following code segment: 01: Using 02: Dim site As New SPSite("http://internet") 03: Dim web as SPWeb = site.RootWeb 04: Dim spSite as new PublishingSite(site) 05: Dim pWeb as PublishingWeb = PublishingWeb.GetPublishingWeb(web) 06: Dim articleCTID as New XPContentTypeID(08373...9373) 07: Dim articlePL as PageLayout=pWeb.GetAvailablePageLayout(articleCTID)(1) 08: Dim pageName as String = DateTime.Now.ToString("yyyyMMdd-HHmmss") 09: Dim nPage as PublishingPage = pWeb.GetPublishingPages().Add(String.Format("myPage.aspx","myPage",0), articlePL) 10: 11: End Using You need to ensure that the content owners can modify the page. What line of code should you use? You create a web part that contains the following code segment: 01: Dim profileManager as new UserProfileManager(Current.Context) 02: Dim profile as UserProfile = profileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LoginName) 03: Dim colManager as new ColleagueManager(profile) You need to ensure that the web part displays a list of colleagues for the current user. Which method should you call? Your company has a Microsoft Office SharePoint Server 2007 farm. The farm contains two site collections named Draft and ProductionReady. You configure the farm to deploy content incrementally from the Draft site collection to the ProductionReady site collection. You need to ensure that the content authors have a higher priority for pages that they deploy to the ProductionReady site collection. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.) You create a Microsoft Office InfoPath workflow task form for users. The form contains all the details of each task. You need to store the value of the Comments field in a variable named UserInput when each user submits the form. Which code segment should you use? You need to programmatically target a list item to an Audience. You write the following code segment: 01: Dim siteAudience as Audience 02: Dim context as ServerContext = ServerContext.GetContext(site) 03: Dim audManager as New AudienceManager(context) 04: siteAudience = audManager.GetAudience("audience1") 05: Dim id as GUID = siteAudience.AudienceID 06: 07: Item.Update() Which code segment should you add at line 6? You have a SharePoint web page named page1.aspx that displays a Microsoft Office InfoPath form. The InfoPath form contains XMLFormView control. You need to pass data from the XMLFormView control to page1.aspx. What should you do? You plan to create a batch file that defines several trusted workbook locations. You need to ensure that connections that are defined in trusted data connection libraries are allowed to be used. Which stsadm.exe operation should you use in the batch file? You create a Microsoft Office SharePoint Server 2007 site. A document library named CompanyWorkbooks on the site contains Microsoft Office Excel workbooks. You need to ensure that users can access the workbooks in the CompanyWorkbooks document library by using Excel Services in Microsoft Office SharePoint Server 2007. What should you do? You have a web part named Web1. Web1 modifies the content of a published Microsoft Office Excel workbook by using Excel web services. You need to open a new Excel Calculation Service session in Web1. Which method should you use? You are developing a Microsoft Office SharePoint Server 2007 solution that integrates with Microsoft SQL Server 2005 Reporting Services. You need to configure the SharePoint solution to allow storage of reports in SharePoint document libraries. What should you do? You are designing a Microsoft Office SharePoint Server 2007 solution. A Microsoft SQL Server 2005 Analysis Services cube stores key performance indicators (KPIs). You need to display details of a KPI in a Web Part. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) You have a Microsoft Office InfoPath form that is published using InfoPath Services. You plan to publish a new version of the InfoPath form. You need to take the current InfoPath form offline and must ensure that users who currently have the form open have one hour to complete the form. You write the following code segment: 01: Dim services as SPServiceCollection = SPFarm.Local.Services 02: Create svc as SPService in services 03: Dim fs As FormService = Try Cast(svc, formService) 04: If fs is not Nothing Then 05: Dim ft as FormTemplate = fs.FormTemplates("myForm") 06: ... 07: End If 08: Next Which code segment should you add at line 6?