Forum Discussion

Sweez's avatar
Sweez
Contributor
10 months ago
Solved

Cube Attribute Information

So this seems like it should be easy, and still may be, but it has me stumpt.  If I know the name of a cube, say "Houston" from Golftream, how can I determine within a business rule what Attribute an...
  • Sweez's avatar
    9 months ago

    I wanted to update the post because after tones of digging I found how to get this information and want to share in case others ever need the same information.  Below is code that will get the attribute information in the example I used above.  When run it will log the following string "DimensionStageName=A1; DimensionFinanceName=InvoiceNo; Enabled=True"

     

    Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
    Dim dimIntegrationInfoList As List(Of IntegrationMapInfo) = IntegrationMap.GetActiveAttributeDimensions(dbConnApp, "Houston", 0)
    Dim logString As New Text.StringBuilder
     
    For Each dimIntegrationInfo As IntegrationMapInfo In dimIntegrationInfoList
    logString.Append($"DimensionStageName={dimIntegrationInfo.DimensionStageName}; DimensionFinanceName={dimIntegrationInfo.DimensionFinanceName}; Enabled={dimIntegrationInfo.Enabled}")
    Next
     
    brapi.ErrorLog.LogMessage(si, logString.ToString)
    End Using