Forum Discussion
Omkareshwar
2 years agoContributor II
Hi Kashinath,
This will give you a list of all the Revenue Accounts make sure you update the code as per your Metadata
//'Edit this line as per your Metadata
Dim objList As List(Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, "EnterTheDimensionNameHere", "EnterYourAccounFilterHere", False)
For Each MemberInfo As MemberInfo In objList
Dim nMemberId As Integer = BRApi.Finance.Members.GetMemberId(si, Dimtype.Account.Id, Memberinfo.Member.Name)
Dim AccountType As AccountType = BRApi.Finance.Account.GetAccountType(si, nMemberId)
If AccountType.Name.XFEqualsIgnoreCase("Revenue") Then
RevenueAccounts.Add(MemberInfo.Member.Name)
End If
Next
//'This section is to print the Members from the list
Dim sEmptyString As String = ""
For Each Member As String In RevenueAccounts
sEmptyString = sEmptyString + " " + Member
Next
Brapi.ErrorLog.LogMessage(si, sEmptyString, "")
Related Content
- 4 years ago
- 4 years ago
- 12 months ago