Thủ thuật Sharepoint 2010 part 88 pot

16 52 0
Thủ thuật Sharepoint 2010 part 88 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Restricting Access to SharePoint Designer  655 RESTRICTING ACCESS TO SHAREPOINT DESIGNER Early in the chapter we mentioned the negative feelings that many users have had about previ- ous versions of SPD. These feelings weren’t just isolated to individuals; many organizations also decided not to use SPD. Despite the fact that SPD 2007 was a very powerful tool, one of its major shortcomings was that it was very difficult to control access. If you had enough access to a site, then you could use SPD. This problem was magnified when the tool was made available as a free download. Organizations wrote lengthy governance documents that outlined how SPD was to be used in their environment, but unfortunately those words didn’t actually stop brave users from downloading the tool and doing things they shouldn’t be doing. SharePoint administrators everywhere can breathe a sigh of relief, because SharePoint 2010 now pro- vides much tighter control over how SPD can be used in an organization with the following settings: Enable SharePoint Designer  — Determines whether SharePoint Designer can be used at all. Enable Detaching Pages from the Site Definition  — Allows edited pages to be customized, which detaches them from the site definition. Enable Customizing Master Pages and Layout Pages  — Removes the Master Page link from the navigation pane and prevents users from updating master pages and layout pages. Enable Managing of the Web Site URL Structure  — Removes the All Files link from the navi- gation pane. These new options enable organizations to control SPD 2010 at the level appropriate to their requirements. SharePoint 2010 allows access to SPD to be controlled at two different levels: Central Administration  — Accessed from the General Application Settings menu, this enables farm administrators to control SPD at the web application level. Disabling the options here prevents site collection administrators from enabling the functionality. Site Collection  — Accessed from the Site Collection Administration section in Site Settings, this enables site collection administrators to control SPD access for Designers and Site Owners. The following example walks you through the process of updating the SPD settings from Central Administration: 1. Open Central Administration from your SharePoint server by clicking StartAll ProgramsMicrosoft SharePoint 2010 ProductsMicrosoft SharePoint 2010 Central Administration. 2. Click General Application Settings in the left navigation. 3. From the SharePoint Designer section, click Configure SharePoint Designer settings (see Figure 22-10). 656  CHAPTER 22 WorkiNg With sharePoiNt desigNer 2010 FIGURE 2210 4. From the settings page, select the appropriate web application from the drop-down at the top right. By default, all the options should be selected. Leave the first box checked, which enables the use of SPD, but remove the checks from the other boxes, as shown in Figure 22-11. Click OK. FIGURE 2211 5. To test the changes, navigate to the URL of the site collection in your web browser to be used for testing, and log in as a site collection administrator. In this example, we use http://contoso. In order for this example to work, the ID that is used must be a site collection administrator. Restricting Access to SharePoint Designer  657 If you were to test with an account that has more permissions, such as a farm administrator account, you might not notice any changes. Since administrator accounts have more rights to the site collection, these changes won’t impact their ability to use SharePoint Designer. 6. From the Site Actions button, choose Edit in SharePoint Designer (see Figure 22-12). 7. SharePoint Designer should open. Note that the Master Page, Page Layouts (only shows in sites with Publishing enabled), and All Sites links should be missing from the left-hand navi- gation pane (see Figure 22-13). If the links are still there, verify that you are logged in as a site collection administrator, not a farm administrator. You can check by clicking the icon in the bottom-left corner of the SPD window, which displays the name of the logged-in user. FIGURE 2212 FIGURE 2213 Also, if you were to click Site Pages and try to edit the home.aspx, you’ll notice that Advanced mode is grayed out (see Figure 22-14). The page can only be edited in Normal mode, which means that only content in Web Part zones can be edited. FIGURE 2214 658  CHAPTER 22 WorkiNg With sharePoiNt desigNer 2010 8. For the next step, we are going to test what happens when you completely disable SPD access. Close the instance of SPD that you were using for the last example. It’s OK to leave your web browser open. 9. Repeat steps 1–3 and remove the check from the Enable SharePoint Designer box. Press OK. 10. Repeat step 5. Now when you try to open SPD, you should see the prompt shown in Figure 22-15. FIGURE 2215 WHAT CAN YOU DO WITH SHAREPOINT DESIGNER 2010? Back in the dark ages, SharePoint Designer 2007 was essentially a web page editor with the ability to do various SharePoint tasks. For many who used SPD 2007, it didn’t do many of those SharePoint tasks very well. SharePoint Designer 2010 has been drastically redesigned to put more of a focus on SharePoint. The page editing capabilities are still there, but SPD 2010 can be thought of as more of a SharePoint site management tool — one that enables site owners to quickly manage and update all areas of their site from a central location. The list of features for SPD 2010 could fill an entire book, so this section focuses on the most significant areas that provide unique functionality. Data Sources The old adage that “Content is king” is just as true today with SharePoint 2010 as it ever was. SharePoint Designer 2010 can be used to create and manage data sources whether the data is com- ing directly from SharePoint or from external sources. Data sources is the term used by SPD 2010 to refer to these sources of content. Lists and Libraries The most basic types of data in SharePoint are lists and document libraries; and in terms of SPD 2010, the concepts don’t change at all. However, creating and managing lists and libraries is much easier with SPD 2010 than in the past. Clicking the Lists and Libraries link in the navigation in your site with SPD 2010 will open up the Lists and Libraries gallery. The gallery shows all of the lists and libraries associ- ated with this site. The gallery interface makes it easy to create new lists and libraries based on a tem- plate, create your own with custom columns, or update existing ones by adding columns or modifying the settings. Data Source Connections Clicking the Data sources link in the navigation will open the gallery, which at first glance looks exactly like the Lists and Libraries gallery. Although lists and libraries are data sources, the important What Can You Do with SharePoint Designer 2010?  659 difference in this gallery can be seen if you look at the Ribbon — you’ll notice several new options. In many cases, the data that you want to interact with in your SharePoint site is actually coming from a source outside of SharePoint. The following types of data source connections are supported: External database  SOAP Web Service  REST Web Service or RSS Feed  XML File Connection  Clicking the corresponding button in the Ribbon of SPD will open a wizard that enables you to quickly connect to each of the different data sources. Once you’ve connected to the data sources, SharePoint Designer 2010 can be used to combine the information from multiple sources into a single view. Many would refer to this as creating a mashup, but in SharePoint terminology this is referred to as a composite application. An example would be if you wanted to combine product information stored in a SQL Server database with customer information stored in another system, which is exporting to an XML file. All of the data is coming from different places and combined into a single view by using SharePoint Designer 2010. External Data Integration One of the most powerful features of SharePoint 2007 was the capability to connect to line-of-business (LOB) systems through the use of the business data catalog, more commonly referred to as the BDC. In theory, it sounded like a great idea that would solve many common business problems that organi- zations face. However, the BDC wasn’t widely adopted because a number of obstacles made implemen- tation difficult. Connecting to the LOB systems required the creation of an XML file called an application defini- tion, which was very difficult to create by hand. Most companies either decided it was too tough to create the file or relied on a third-party product to generate the file. However, even when a company was able to get the BDC connected, out of the box it only sent information in one direction. Although data from external sources could be read from the BDC in SharePoint, it wasn’t possible to easily write changes made from SharePoint back to the LOB systems. At the end of the day, most companies felt that although the BDC sounded like a good idea, it was too much work to implement and there were too many limitations to work through. SharePoint 2010 greatly enhances the capability to connect to LOB systems — using a feature that has been renamed Business Connectivity Services (BCS). SPD 2010 can now be used to create the connec- tions into LOB systems such as SQL Server databases, PeopleSoft, SAP, and more. Once the connections are made, the information can be surfaced as an external content type (ECT) in an external list. This enables business users to interact with external data in SharePoint just like any other type of list. For example, if you were to connect to your customer database in SQL Server and add it as an external list, you could update the content in SQL Server directly by making changes to the data in SharePoint. The BCS now enables changes from SharePoint to be written back to LOB systems. As a practical application for the BCS, once you’ve connected to LOB systems the data returned in the external list behaves just like any other data in SharePoint. This means that not only can you make updates to it, but it can also be indexed and searched, or used as metadata in lists and 660  CHAPTER 22 WorkiNg With sharePoiNt desigNer 2010 libraries. For example, it would be possible to connect to an external products database and then add a Products field to a document library. When a document is added to this library, a user could select a product name as metadata, and other fields could then be selected to be added from the database as metadata. If the product name were selected as metadata, then the price, color, and weight would be automatically added. Using SharePoint Designer 2010 to Create an External List The goal of this example is to walk you through the steps for creating an external list with SharePoint Designer 2010. Business Connectivity Service (BCS) is covered in more detail in Chapter 24. For this example, we’ll be using the AdventureWorks sample database. If you do not yet have it installed, you can download it from http://msftdbprodsamples.codeplex.com/. Be sure to download the correct version based on the version of SQL Server you have installed. The examples in this chapter are shown using the SQL Server 2008 R2 databases. After downloading and installing the database, follow these steps: 1. Open SharePoint Designer 2010 and open your SharePoint site. 2. From the navigation pane, click the link for the External Content Types gallery. 3. Click the External Content Type button in the Ribbon (see Figure 22-16). 4. Enter a Name and Display Name. Clicking the words “New external content type” will allow you to edit the name. For this example, enter Products as the value for both fields. 5. Click the link that says “Click here to discover external data sources and define operations” (see Figure 22-17), which will open a new page that will enable you to configure the connec- tion to your external data source. FIGURE 2216 FIGURE 2217 6. From the new screen, click the Add Connection button located in the upper left hand corner of the center panel. This will open up a series of windows that will walk you through the process of configuring the connection to the external data source. With previous versions of SharePoint, this process needed to be done either by hand, which was extremely complex, or through the use of third-party products. 7. From the first pop-up, select the External Data Source Type as SQL Server and click OK. 8. Next, specify the Database Server and Database Name for the database to which you want to connect (see Figure 22-18) from the second pop-up. Click OK. What Can You Do with SharePoint Designer 2010?  661 9. When the Data Source Explorer is loaded, expand the Tables section, select the Product table, right-click on it, and click Create All Operations (see Figure 22-19). You might receive a warning when you expand the tables saying that some columns have unsupported data types. If you do receive the warning, press OK to move past it and continue with the demo. It will not impact the rest of the steps. FIGURE 2218 FIGURE 2219 10. The All operations window will open, which enables you to specify more details about how the external content type works. For this example, leave all of the default settings and click Finish. 11. You’ll notice that there’s now a green check mark displayed under the External Content Type Operations section, indicating that everything is working as expected. However, before you can use the external content type, it is necessary to save it. To do so, press the Save icon in the upper-left corner of the screen (see Figure 22-20), which will save it to the Business Data Connectivity Metadata store. 12. Click the Create Profi le Page button in the Ribbon (see Figure 22-21) to create a profi le page that will be used to display the information from external data when it is shown in SharePoint. You might receive an error when you try to create the profi le page stating that you must fi rst set up a host site. If this is the case, you will need to log in to Central Administration to make the change. Click on Manage service applications from under the Application Management section. Next, click on the link for the Business Data Connectivity Service. Then you’ll need to create the host page by clicking the Confi gure button in the Ribbon. In the dialog that opens, accept the default settings and then click on the OK button. You should now be able to create the Profi le Page from within SPD. 662  CHAPTER 22 WorkiNg With sharePoiNt desigNer 2010 13. Once SharePoint has connected to the data source, you’ll make an external list so that you can interact with the data in SharePoint. To do this, click Lists and Libraries in the Site Objects panel in SPD. 14. From the Ribbon, click the External List button (see Figure 22-22). FIGURE 2220 FIGURE 2221 FIGURE 2222 15. From the External Content Types Picker, choose Products and click OK (see Figure 22-23). FIGURE 2223 16. Enter Products as the name for the new external list and click OK. 17. If you browse to your SharePoint site and click on the list, the content from the SQL Server table should be returned. If everything looks good, skip to step 20. If this is the first time you’ve configured a BCS connection, you’ll probably get an error stating “Access denied by Business Data Connectivity” (see Figure 22-24). To resolve this, open Central Administration and go to Application Management and then click Manage service applications. Click the Business Data Connectivity Service. Place a check in the box next to the new connection you made, and click the Set Object Permissions button in the Ribbon. 18. The Set Object Permissions dialog, shown in Figure 22-25, will open. In the top box, specify the accounts to grant permissions to and then click the Add button. 19. Once the account has been added, select the permissions the account should have. For this example, you’ve just added the account that will be browsing the external list. This account was granted all permissions and the option to Propagate permissions to all methods was checked. Click OK. What Can You Do with SharePoint Designer 2010?  663 FIGURE 2224 The content in the external list should now be displayed without the error. In a production environment, it would be necessary to specify the users and/or groups who have permission to read from and write to this data source. If you are still having issues, it might be necessary to check the permissions to the AdventureWorks database in SQL Server. FIGURE 2225 20. The external list should display the information from the SQL table. As you can see, it looks very similar to a SharePoint list, and in fact it can be edited just like one. Select the fi rst item called Adjustable Race with a product number of AR-5381. The Ribbon will change to display new options. Click the Edit Item button. 664  CHAPTER 22 WorkiNg With sharePoiNt desigNer 2010 21. Update the ProductNumber field and click the Save button (see Figure 22-26). FIGURE 2226 22. Now, not only has the field been updated in the external list, but if you were to look in SQL Server you’d find that the field has also been updated there (see Figure 22-27). As shown in this example, BCS has many similarities to its predecessor, the BDC, but it offers significant improvements. Connections to external data sources can be quickly made with SPD 2010 and then surfaced directly in SharePoint as an external list; and content from the data sources can then be edited from the external list, and changes reflected back in the data source. Views and Forms The content stored in SharePoint is important, but equally important is being able to capture and display the information in a highly usable way. Views are the primary way that list and library con- tent is displayed back to users; and forms make it easier and more intuitive for users to enter content into SharePoint. SPD 2010 enables users to quickly customize views and forms to meet the needs of their organization. Views Views are the primary way that information from lists and libraries are displayed. If you are familiar with the concept in SharePoint 2007, you’ll find very little has changed in SharePoint Designer 2010, which enables you to customize the out-of-the-box views or create new ones for the lists and libraries in your site. To access the views for a list, click the Lists and Libraries link in the navigation pane and then click once to open the settings page for a list. The list of views is displayed at the right side of the center column of the summary panel. Clicking the name of a current view or pressing the New but- ton will enable you to edit the view as an XSLT List View. FIGURE 2227 [...]...What Can You Do with SharePoint Designer 2010?   ❘  665 XSLT List View Web Part With SharePoint Designer 2007, once content was added to the site, the information could be displayed on the site using views and List View Web Parts Customization was limited to a few out-of-the-box options To get more flexibility, many users opted for the Data View Web Part, which was created with SPD and... View Web Part was that once it deployed, it wasn’t easy to update Basically, users had to edit the page in SPD to make changes to the Web Part When it came to showing information on the page, users were forced to choose between the flexibility to make changes in the browser and custom design SharePoint 2010 addresses this issue by combining the best of both options into the XSLT List View Web Part All... many of the common tasks related to views and forms in an organization SharePoint Designer 2010 makes it easy to customize the display of information with the XSLT List Web Part and integration with InfoPath forms Workflows One of SharePoint s biggest selling points is the capability to use workflows to manage business processes SharePoint Designer is the preferred tool for creating custom, rules-based... List View Web Part, which can be both styled using SPD and edited in the browser Editing Views and Forms with SharePoint Designer In this example, you are going to walk through the various options available in SPD 2010 for views and forms You’ll create a list with a few fields, customize the list form in InfoPath, edit the view to add conditional filtering, and then create a custom view Open SharePoint. .. Designer is the preferred tool for creating custom, rules-based declarative workflows that don’t require any code For more specific information on workflows in SharePoint 2010, see Chapter 25, which is dedicated entirely to this subject SharePoint Designer 2010 can create three types of workflows: ➤➤ List workflow — These workflows are directly associated with a list This was the only type of workflow supported... KPI for any list or library, no matter which version of SharePoint you had.) The final step is to create a custom view that shows only the values you are interested in 24 From the Championships list settings page, click the New button, shown in Figure 22-39, to create a new view called NFL and click OK What Can You Do with SharePoint Designer 2010?   ❘  669 Figure 22-37 Figure 22-38 Figure 22-39 25... modify this one 17 The XSLT List View Web Part will open In order to make this a little easier to work with, you can add sample data From the Ribbon, click the Design tab under the List View Tools section and place a check in the Sample Data box, as shown in Figure 22-33 If you don’t see the Design tab, you might first have to click on the XSLT List View Web Part Figure 22-32 Figure 22-33 18 Because... one icon from the heading row To remove the icons for each of the data rows, click on the paper clip icon in the next row and press Delete (see Figure 22-34) 668  ❘  Chapter 22   Working with SharePoint Designer 2010 20 After deleting the paper clip icons for each of the data rows, the left-most cell should still be selected It is important that the whole cell be selected — if the whole cell is selected... section which is located in the middle of the center panel, click the Edit list columns link, which will open the editor for this list ➤➤ NFL ➤➤ MLB ➤➤ NHL ➤➤ NBA 666  ❘  Chapter 22   Working with SharePoint Designer 2010 Figure 22-28 Figure 22-29 10 While still in the editor for the Choice column, delete the value from the Default Value field, leaving the field empty, and click OK You’ll be returned to... view to edit it 26 Press the Filter button in the Ribbon (see Figure 22-40) If you don’t immediately see it, select the Options tab under List View Tools 670  ❘  Chapter 22   Working with SharePoint Designer 2010 Figure 22-40 27 For the Filter Criteria, set the values to the following criteria: ➤➤ Field Name: League ➤➤ Comparison: Equals ➤➤ Value: NFL 28 Click OK 29 The new has been created To . Open Central Administration from your SharePoint server by clicking StartAll ProgramsMicrosoft SharePoint 2010 ProductsMicrosoft SharePoint 2010 Central Administration. 2. Click. well. SharePoint Designer 2010 has been drastically redesigned to put more of a focus on SharePoint. The page editing capabilities are still there, but SPD 2010 can be thought of as more of a SharePoint. just as true today with SharePoint 2010 as it ever was. SharePoint Designer 2010 can be used to create and manage data sources whether the data is com- ing directly from SharePoint or from external

Ngày đăng: 02/07/2014, 12:20

Tài liệu cùng người dùng

Tài liệu liên quan