cancel
Showing results for 
Search instead for 
Did you mean: 
OSAdmin
Community Manager
Community Manager

Create a new account member

 

'>>>>>>>>>>>>>>CAUTION<<<<<<<<<<<<<<<<
'BRApi.Finance.MemberAdmin.SaveMemberInfo
'This API does not make entries into the Audit tables and will not be reflected in the Audit Metadata Report
'Recommended usage of this API during implementation only

'Create a new MemberInfo object with its child objects.
Dim objMemberPk As New MemberPk(DimType.Account.Id, DimConstants.Unknown)

'Update Dim Name accordingly
Dim objDim As OneStream.Shared.Wcf.Dim = BRApi.Finance.Dim.GetDim(si, "<Dimension Name>")

'Create New Member
Dim objMember As New Member(objMemberPk, "<New Member Name>", "<Member Description>", objDim.DimPk.DimId)

'Create VaryingMemberProperties object
Dim objProperties As New VaryingMemberProperties(objMemberPk.DimTypeId, objMemberPk.MemberId, DimConstants.Unknown)

'Create new member info object for new member
Dim objMemberInfo As New MemberInfo(objMember, objProperties, Nothing, objDim, DimConstants.Unknown)

'Modify some member properties. Account dimension, in this example.
Dim accountProperties As AccountVMProperties = objMemberInfo.GetAccountProperties()
accountProperties.AccountType.SetStoredValue(AccountType.Revenue.Id)
accountProperties.Text1.SetStoredValue(ScenarioType.Unknown.Id, DimConstants.Unknown, "MyNewText1Value")

'Save the member and its properties.
Dim isNew As TriStateBool = TriStateBool.TrueValue
BRApi.Finance.MemberAdmin.SaveMemberInfo(si, objMemberInfo, True, True, False, isNew)
Version history
Last update:
‎04-25-2022 08:38 AM
Updated by:
Contributors