2

To include multiple taxonomy values, the values should be separated by ;#. Example: 44;#USA|c1815b1d-346f-4ce1-b2cb-15df5e12b0b3;#45;#INDIA|e141d775-7a3b-40aa-a680-98039b375828 Source: Update Managed Metadata column Default Value(s) using CSOM - C#


1

Your else statement is assuming that if it is not a "User" then it is treating it as if it were a SharePoint Group -- SharePoint Groups are not the same as Azure Active Directory (AAD) groups. A Multi-user column in SharePoint will not hold references to SharePoint Groups, only to AAD Users or AAD groups. With that said, you've actually made things more ...


1

try the below code, I have added context.ExecuteQuery(); in the required places. foreach (ListItem i2 in collListItem2) { var templatenumber = isDeal ? "10" : i2["TemplateNumber"]; CamlQuery camlQuery3 = new CamlQuery(); camlQuery3.ViewXml = string.Format("<View Scope=\"RecursiveAll\"><Query><Where><Eq><FieldRef Name='Templates' /&...


1

Try below piece of code: private static bool FolderExists(ClientContext context, string url) { var folder = context.Web.GetFolderByServerRelativeUrl(url); context.Load(folder, f => f.Exists); try { context.ExecuteQuery(); if (folder.Exists) { return true; } return false; } catch ...


1

Try adding RoleAssignments in this way: folder.ListItemAllFields.RoleAssignments.Add(p, new RoleDefinitionBindingCollection(ctx) { roleDefintion }); Source: Error: Cannot add a role assignment with empty role definition binding collection.


1

Even after breaking permission inheritance, you can't directly change a user's permissions to Read -- you technically have to remove their existing permissions, then Add the Read permission. First, even though you only want to grant a single permission (i.e. Read), you still need to construct a RoleDefinitionBindingCollection to hold that one RoleDefinition,...


1

You need to get a TaxonomyFieldValueCollection use the SetFieldValueByValueCollection of the TaxonomyField object. var field = item.ParentList.Fields.GetByInternalNameOrTitle("CorpType"); var corpTypeTaxField = context.CastTo<TaxonomyField>(field); context.Load(item,i=>i[TaxKeywordFieldName]); corpTypeTaxField.SetFieldValueByValueCollection(...


Only top voted, non community-wiki answers of a minimum length are eligible