Getting Account UD6 Constraint value using BRApi

sfilho
New Contributor III

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

2 ACCEPTED SOLUTIONS

DanielWillis
Contributor III

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)

 

 

View solution in original post

sfilho
New Contributor III

That worked perfectly thank you for the help!!!

View solution in original post

2 REPLIES 2

DanielWillis
Contributor III

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

That worked perfectly thank you for the help!!!