OSAdmin
Valued Contributor

This snippet will modify a Member property that can vary by Scenario Type and/or Time. Just pass the relevant ScenarioType ID or Time member ID to set it in a more specific way; it will then appear as a "Stored Item" in the interface.

Note: SaveMemberInfo does not create entries in Audit tables, which means the Audit Metadata report will not contain anything related to this operation. For this reason, we do not recommend to use this snippet outside of implementation activities or in production environments.

'Get the MemberInfo object for the member you want to update, in this example an Account.
Dim objMemberInfo As MemberInfo = BRApi.Finance.Members.GetMemberInfo( _
	si, DimType.Account.Id, "<Member Name>", True)
     
' Retrieve member properties so we can modify them.
Dim accountProperties As AccountVMProperties = objMemberInfo.GetAccountProperties()
' change the Account Type
accountProperties.AccountType.SetStoredValue(AccountType.Revenue.Id)
' change default Text1 value
' if you want to set it for a specific ScenarioType and/or time, 
' use the relevant values in the first 2 parameters
accountProperties.Text1.SetStoredValue( _
	ScenarioType.Unknown.Id, DimConstants.Unknown, "<UpdatedValue>")
     
'Save the member and its properties.
Dim isNew As TriStateBool = TriStateBool.TrueValue
BRApi.Finance.MemberAdmin.SaveMemberInfo(si, objMemberInfo, False, True, False, isNew)
Version history
Last update:
‎09-28-2023 05:56 AM
Updated by:
Contributors