Forum Discussion

sfilho's avatar
sfilho
New Contributor III
3 years ago

Getting Account UD6 Constraint value using BRApi

Hello, good evening, I am trying to build a BRApi function to get the content of the UD6 constraint from an Account dimension member and so far I couldn't find a function that returns the informati...
  • DanielWillis's avatar
    3 years ago

    I was going to write something but it just sounded confusing since its just a series of functions so hopefully simple code speaks louder than words. The below works.

    Dim Account As MemberInfo = brapi.Finance.Members.GetMemberInfo(si,DimType.Account.Id,"AccountMemberNameHere",True)
    Dim UD6MemberID = Account.GetAccountProperties().UD6Constraint.GetValue(CubeType.CubeType1.Id)
    Dim UD6Member As Member = brapi.Finance.Members.GetMember(si,DimType.UD6.Id,UD6MemberID)
    brapi.ErrorLog.LogMessage(si, UD6Member.Name)

     

     

  • sfilho's avatar
    sfilho
    3 years ago

    That worked perfectly thank you for the help!!!