Returns the member ID of the top member of an account’s Custom 1 dimension hierarchy. In other words, this method returns the member ID of the Custom 1 member that has been defined as an account’s Custom1TopMember attribute.
<HsvAccounts>.GetTopMemberOfValidCustom1Hierarchy lItemID, plTopMember
The following example creates a function that takes an account’s label and returns the label of its top Custom 1 dimension member.
Function GetCust1FromAcct(sAcct As String) As String
Dim cAccounts As HsvAccounts, cTreeInfo As IHsvTreeInfo
Dim lAcctID As Long, lCust1ID As Long, sLabel As String
Set cAccounts = m_cMetadata.Accounts
Set cTreeInfo = m_cMetadata.Accounts
lAcctID = cTreeInfo.GetItemID(sAcct)
cAccounts.GetTopMemberOfValidCustom1Hierarchy lAcctID, lCust1ID
Set cTreeInfo = m_cMetadata.Custom1
cTreeInfo.GetLabel lCust1ID, sLabel
GetCust1FromAcct = sLabel
End Function