Forum Discussion
MarkBird
2 years agoContributor III
Hi all
I'm using the BRApi.Finance.MemberAdmin.RemoveMember to remove a UD4 member which works well.
I was wondering if you had any suggestions on what the best way to check on whether there is information stored against the member is?
i.e. is there a built in function or do I need to do a get data cell formula
Thanks,
Mark
MarkBird
2 years agoContributor III
I came up with the following solution, which seemed to be the simplest:
Dim d As [Dim] = BRApi.Finance.Dim.GetDim(si, "UDDimension")
Dim m As Member = BRApi.Finance.Members.GetMember(si, d.DimPk.DimTypeId, xfRow.OriginalDataRow("MemberName"))
Dim sql As String = "SELECT TOP 1 * FROM vDataRecordAll Where UD4Id = '" & m.MemberId & "'"
Dim dt As DataTable = BRApi.Database.ExecuteSql(dbConn, sql, False)
If dt.Rows.Count <> 1 Then
BRApi.Finance.MemberAdmin.RemoveMember(si, d.DimPk, m.MemberPk)
End If
- JackLacava2 years agoCommunity Manager
I think that should do, although in theory you might want to check one of the Stage views too, on the target columns.
Related Content
- 4 years ago
- 4 years ago
- 4 months ago
- 4 years ago