Forum Discussion

Krishna's avatar
Krishna
Valued Contributor
2 years ago
Solved

Entity Security using extender rule

Hi - Has anyone created entity readdatagroup using the below function 

 

Dim objGroup As Group = Group.CreateEntityReadDataGroup()

 

Any help would be appreciated 

  • Krishna's avatar
    Krishna
    2 years ago

    I found the solution and the below is the code sample for updating the Entity Security Group. The below update the Display Group for an entity 

     

    'Assign the Display Group 
    Dim objWritableMember As WritableMember = BRApi.Finance.Members.ReadWritableMemberNoCache(si, dimTypeId.Entity, EntityName)
    objWritableMember.ReadDataGroupUniqueID2 = BRApi.Security.Admin.GetGroup(si,ReadDataGroup2).Group.UniqueID
    BRapi.Finance.MemberAdmin.SaveMemberInfo(si,True,objWritableMember,False,Nothing,False,Nothing,TriStateBool.FalseValue)

     

3 Replies

  • Hey JackLacava​ Krishna​ ,

    I am using an Exclusion group on my Entity Read Group 1. However, when I try to pull the member, it is giving me an object reference error. It works fine if the entity Security group is not an exclusion group.

    Regards,
    Nikhil Powar

  • JackLacava's avatar
    JackLacava
    Icon for OneStream Employee rankOneStream Employee

    Some of the APIs are for internal use.

    What are you trying to do, exactly? There is probably an easier way than rummaging through unknown functions.

    • Krishna's avatar
      Krishna
      Valued Contributor

      I found the solution and the below is the code sample for updating the Entity Security Group. The below update the Display Group for an entity 

       

      'Assign the Display Group 
      Dim objWritableMember As WritableMember = BRApi.Finance.Members.ReadWritableMemberNoCache(si, dimTypeId.Entity, EntityName)
      objWritableMember.ReadDataGroupUniqueID2 = BRApi.Security.Admin.GetGroup(si,ReadDataGroup2).Group.UniqueID
      BRapi.Finance.MemberAdmin.SaveMemberInfo(si,True,objWritableMember,False,Nothing,False,Nothing,TriStateBool.FalseValue)