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 information. Does anybody knows if it is possible to build a BRApi function like that or have done that in the past?

Thank you for the help!!!!

  • 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!!!

  • DanielWillis's avatar
    DanielWillis
    Valued Contributor

    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
      New Contributor III

      That worked perfectly thank you for the help!!!