1. | Create a new site using the Team Site template.
|
2. | Create a new list using the Custom List template and name it Donations.
|
3. | From the Donations list, click the List tab, and then click List Settings.
|
4. | Scroll down and click the Create Column link.
|
5. | Name the new column Item Description and check Single Line of Text; leave the other settings and click OK.
|
6. | Return to the list all items view by clicking the list name in the breadcrumb.
|
7. | Click Add New Item.
|
8. | Enter a title for the entry, such as Kodak Z7590 Camera, and enter text in the Item Description field such as 5.0 Megapixels, 10x zoom, very portable, works great.
|
9. | Click All Site Content from the Quick Launch, and click Announcements in the Lists section of the page.
|
10. | In the Announcements list, click the List tab, and then click List Settings.
|
11. | Scroll down and click Create Column.
|
12. | Title the column Donation Lookup and select the Lookup type of column.
|
13. | In
the Additional Column Settings section of the screen, click the
drop-down menu under Get Information From, and select Donations. Verify
that Title appears in the drop-down menu under In This Column. Check the
box next to Item Description in the next section down, as shown in Figure 4.
|
14. | Check the box next to Enforce Relationship Behavior, and then check the circle next to Restrict Delete, as is also shown in Figure 4.
|
15. | Click
OK. Click OK for the message “This column must be indexed to enforce a
relationship behavior. Do you want to index this column.”
|
16. | Click the Announcements link from the breadcrumb to return to the All Items view of the Announcements list.
|
17. | Click the Add New Announcement link.
|
18. | Enter a title for the announcement (for example, Generous donation!). Click the drop-down list in the Donations Lookup field and select Kodak Z7590 Camera. Click OK. The result should look like Figure 5.
|
19. | Return to the Donation list by clicking its link in the Quick Launch.
|
20. | Access
the drop-down menu for the list item entered in steps 7 and 8, and
click Delete Item. Click OK to confirm the deletion. An error message
will appear, stating “This item cannot be deleted because an item in the
‘Announcements’ list is related to an item in the ‘Donations’ list.”
Tip
Use lookup columns with the
Enforce Relationship Behavior option and Restrict Delete to ensure that
the target item of the lookup can’t be deleted if it is referenced by an
item in the “parent” list.
|
21. | Next,
the lookup column will be set to Cascade Delete. Start by clicking All
Site Content from the Quick Launch, and click Announcements from the
Lists section.
|
22. | Click the List tab, and then click List Settings.
|
23. | Scroll down to the Columns section and click Donations Lookup column.
|
24. | Scroll down to the Relationship section, and this time select Cascade Delete. Click OK.
|
25. | Navigate to the Donations list by clicking its link in the Quick Launch.
|
26. | Access
the drop-down menu for the list item (Kodak Z7590 Camera in this
example) and click Delete Item. A message will appear, stating “Sending
this item to the site Recycle Bin will also send any related items in
the following lists to the site Recycle Bin: [Announcements]. Are you
sure you want to send the item(s) to the site Recycle Bin?” Click OK.
|
27. | Navigate to the Announcement list to verify that the announcement is also deleted.
|