Hi
I am trying to create a group using the below code
public static Group CreateGroup(string name,string Description,string grouptype,int parentGroupId,string expdate) { IList<ExtendedAttribute> list = new List<ExtendedAttribute>(); ExtendedAttribute extendedAttribute = new ExtendedAttribute { Key = "GroupSubscExpDate", Value = "test" }; list.Add(extendedAttribute); Group group = null; GroupsCreateOptions gcp = new GroupsCreateOptions { ParentGroupId = parentGroupId, Description = Description, AutoCreateApplications = false, ExtendedAttributes = list }; Apis.Get<IUsers>().RunAsUser("admin", () => { group=Apis.Get<IGroups>().Create(name, grouptype, gcp); }); return group; }
Group created successfully .But i cant able to find any Extended Attributes while accessing the group using widget api $core_v2_group.Get() , what wrong with the code ?
Also when i try to create a group from widget api how can i pass extended attributes , I tried with the below code ,but its throwing error
#set($extendedattr = "%{'_ExtendedAttributes_MyKey'= 'MyValue'}") $core_v2_group.Create("Test", "PrivateListed", "%{ AutoCreateApplications = false, ExtendedAttributes = $extendedattr}")