MMD Sitecolumn to be loaded Programatically in Content Type
-
12 เมษายน 2555 20:25
Hi,
I have a termset with multiple levels. For ex.,
North America
-Canada
--Quebec
--British Columbia
-USA
-- New York
-- New Jersey
-- Connecticut
I have a couple of content types that all refer to the above Location sitecolumn that is a managed meta data column. The difference is in ContentType1, the site column should only show Canada and below terms as the selection and in ContentType2, the Location sitecolumn should show USA and below as the selection. I can accomplish this with 2 different site columns, one for each content type. But can I accomplish this by with one sitecolumn, showing different levels in the Termset hieararchy depending on content type?Thanks,RAKAT
ตอบทั้งหมด
-
16 เมษายน 2555 8:38ผู้ดูแล
Hi RAKAT,
Using separate columns with expected terms in each column is the normal way for your scenario, however, from your description, if you want to use one site columns, make part of terms available for the column based on content type seems to make a detour.
Based on my understanding, a workaround may be that create event receivers for each content type, in the event receiver, when new/updating the item, check whether the meta data column terms is correct for the content type, and change the column if needed, set it based on the content type, more information about create event receiver for content type:
Thanks,
http://sharepointx-men.com/2010/07/09/sharepoint-2010-event-receivers-part-1-create-event-receiver-for-content-types/
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/6d40e2df-c1c5-43fc-a2c9-91d6653ff9e9
QiaoQiao Wei
TechNet Community Support
- ทำเครื่องหมายเป็นคำตอบโดย Qiao WeiMicrosoft, Moderator 20 เมษายน 2555 13:18