-
Create a new document library called Estimates in your SharePoint site. To do
this, click Site Actions | Create A Document Library, provide a
name for the document library (such as Estimates), and click Create.
-
After the document library has been created, click the
Library tab and then click Library Settings. In Library
Settings, click Create Column.
-
In the Create Column dialog box, provide a name for the
column (for example, Customer
Data), and then select External Data as the column type.
-
On the same page, scroll down to see the Additional Column
Settings section, click the Select A Content Type button (the
icon located to the far-right of the External Content Type
field). When you select this
content type, the entity elements appear as optional fields to
be displayed in the document library. Select the Select All
Fields check box.
-
Click OK to complete the process. Now when you click the
Estimates document library, you should see something similar to
the following.
-
Click Add Document to add a new document. Navigate to the
Estimates.docx document you created earlier (or, if you haven’t
created a document yet, create one, save it, and then upload it
to the SharePoint site). Note that when you upload the
data, you can associate a specific customer with
the new document. You can do this by clicking the Select A
Content Type button and then selecting a specific customer from
the Find dialog box, as shown here.
The result in the Save dialog box is that information about the
customer now appears in the Customer Data field (as shown in the following
graphic).
Also, when the document is added to the document library,
the ECT data fields are now completed with the information from
the WCF service that is deployed to Windows
Azure.
Although having the data available in the columns is okay,
you’re still not quite there; you really want to have the
ability to populate the data in the document.
-
Return to the document library, click the Document tab,
and then select New Document.
-
When the document loads, amend it so you have something
that looks similar to the document below.
-
On the Insert ribbon tab in the Word document, select
Quick Parts and Document Property. In the submenu, the different
fields that belong to the AzureCustomers
ECT are listed and available for you to insert into the
document. (You can see this because Customer Data and its
specific fields are listed in the Document Property
option.)
-
Click Customer Data to insert the customer data next to
Email: in your document. Office inserts a content control that is bound to
a specific field in your ECT entity. Click the Select A Content
Type button, and select one of the customers from the dialog
box. You can then click Insert | Quick Parts | Document Property
and then select other fields to include in the document. When
complete, your document should look similar to the
following.