We’ve now successfully created connections to our sample ERP system and an external web service that can be used to retrieve web results relating to competing products. With these connections in place, our next step in completing the user interface for our application is to define a new document library in which to store competitive analysis documents.
With these new columns in place, we’re ready to start uploading or creating documents. As you’ll see when you upload a document, you are prompted to select a Model and a Competing Model before you can save the document. In both cases, you can make use of the External Picker Control to select the item from a list.
Once your document is saved to the document library, you’ll notice that additional fields have been carried through from the external content type, such as Model: Modified Date and Competing Model: Date Time.
NOTEAt the time of writing, creating External Data Columns is not supported using SharePoint Designer 2010 Beta 2.
By using External Data Columns, you can easily combine data from external systems with SharePoint-generated data, allowing for data consistency throughout your applications. But what happens when you want to drill down into the data that’s associated with External Data Column? The answer is profile pages. This feature is available in SharePoint Server 2010 only, and before it can be used, it must be configured via SharePoint 2010 Central Administration. Let’s do that now:
NOTEAs you saw, service applications can be shared between multiple applications. Generally where profile pages are being used by multiple sites, a dedicated site to host the pages will be set up. For the sake of simplicity, we’ve used our demonstration site, but this is not indicative of best practice. Now that we have the facility to create profile pages, we need to do the work to create a page for our Model external content type. Using SharePoint Designer, this is simple:
That’s all there is to it. A new profile page has been created that will be automatically linked to our Model content type wherever it appears in lists. To see this in action, navigate to the Competitive Analysis document library that we created earlier. You’ll notice that items in the Model column are now hyperlinks instead of plain text. Clicking the hyperlink will take you to the auto-generated profile page for that item.
The profile page presents a read-only view of the entity together with any associated entities. In this case, you can see the Model together with any Products that are based on the model. As mentioned earlier, the profile page is generated using External Data Web Parts and as such can be customized further to meet specific requirements.
For example, in the Model profile page, let’s say we wanted to hide the rowguid and ProductModelID columns. By selecting Edit Page from the Site Actions menu, and then editing the properties of the Business Data Item web part, we can easily hide these fields..
Default Actions on External Content Types
I’m sure you’ll agree that profile pages are pretty useful stuff. Not only can we easily attach data to our SharePoint lists and libraries using BCS, but with a few mouse clicks we can generate a customizable user interface that can be used to drill down into that data.
But how does it work? What is it that connects the content type to the profile page? What if the external system is web-based and we want to link to a page there instead? What if we’re using SharePoint Foundation 2010 and don’t have the profile pages feature?
It’s all about actions and in particular the Default Action that’s been defined for our External Content Type. The BDC model allows multiple actions to be defined for each entity, where an action is basically a parameterized URL that can be used to connect to an external system or to redirect to a page within the SharePoint site, as is the case with profile pages. Once actions have been defined, they are available wherever the content type is presented. As we saw earlier, for example, actions are automatically attached to External Data Columns.
If we look back to our Competitive Analysis document library, one of the things we can see is that no actions are defined for our WebResult content type. By clicking the icon to the left of the text in our Competing Model column, you can see that no actions are available on the context menu.
Since our WebResult content type represents a web page, it would be useful if our default action was simply to connect to the associated web page. We can make this change in Visual Studio 2010, as follows:
Now when you reload the Competitive Analysis document library, the Competing Model column is hyperlinked. Clicking the link takes you to the URL originally returned from our Bing search.
Share Point 2010 Related Interview Questions
|Web Services Interview Questions||XML Interview Questions|
|Share Point 2010 Interview Questions||ASP.NET Interview Questions|
|Share Point Administration Interview Questions||BizTalk Admin Interview Questions|
|Microsoft Office SharePoint Server (MOSS) Interview Questions||Biztalk Server Interview Questions|
|Asp Dot Net Mvc 4 Interview Questions||Biztalk Esb Toolkit Interview Questions|
|InfoPath Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.