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