Forum Discussion
JennyCalvache
10 months agoNew Contributor III
I think I figure it out.
Dim ParentGroup As String = args.NameValuePairs.XFGetValue("ParentGroup")
Dim osAccountMember As Member = BRApi.Finance.Members.GetMember(si, dimtypeid.Account, ParentGroup)
Dim actDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si, "ST_Accounts")
Dim osBaseList As list(Of Member) = BRApi.Finance.Members.GetChildren(si, actDimPk, osAccountMember.MemberId)
For Each baseMember As Member In osBaseList'osBaseList
'===Remove first====
Dim PId As Integer = BRApi.Finance.Members.GetMemberId(si, dimTypeId.Account, osAccountMember.Name)
Dim myId As Integer = BRApi.Finance.Members.GetMemberId(si, dimTypeId.Account, baseMember.Name)
Dim relationshipPks As New List(Of RelationshipPk)
Dim RelPk As New RelationshipPk(actDimPk.DimTypeId, PId, myId)
relationshipPks.Add(RelPk)
BRApi.Finance.MemberAdmin.RemoveRelationships(si, actDimPk, relationshipPks, True)
Next
Related Content
- 4 months ago
- 11 months ago