SharePoint 2013에서 제품 카탈로그 - 제품 목록의 항목 범주 열에 프로그래밍 방식으로 태그를 추가하는 방법은 무엇입니까?

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/49328

  •  09-12-2019
  •  | 
  •  

문제

사용자 정의 WebPart가 있으므로 제품 목록에 항목을 추가 할 수 있습니다. 목록의 항목 catagory 열에 태그를 추가 할 수있는 방법이 필요합니다.

어떻게해야합니까!

도움이 되었습니까?

해결책 2

i figured out a way to do this TaxonomyFieldValueCollection TagsCat = new TaxonomyFieldValueCollection(String.Empty); TagsCat.PopulateFromLabelGuidPairs(TaxonomyWebTaggingControl1.Text);

                            var taxKeywordField = oSpListItem.Fields.GetField("ProductCatalogItemCategory") as TaxonomyField;
                            taxKeywordField.CreateValuesInEditForm = true;
                            try
                            {
                                taxKeywordField.ParseAndSetValue(oSpListItem, TagsCat[0].TermGuid);
                            }
                            catch (Exception e2)
                            {

                            }
                            oSpListItem.Update();

This worked for me

다른 팁

Take a look at these scripts on TechNet. The script starting with 5 is updating the Item Category column. http://gallery.technet.microsoft.com/Import-list-content-to-f735d7fb

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top