NidhiMangtani
3 years agoContributor III
Updating scenario member through an extensibility rule
Hi All,
Need some help in updating properties of scenario member through an extensibility rule.
'Workflow Time
scenarioProperties.WorkflowTime.SetStoredValue(BRApi.Finance.Members.GetMemberId(s...
- 3 years ago
Hi Bharti
I don't think, that in this case, you can use the SetStoredValue function, you need to use the SetStoredPropertyItem function.
This sample works:
Dim scenarioMember As Member = BRApi.Finance.Members.GetMember(si, dimtypeid.Scenario, "Actual") Dim scenarioMemberInfo As MemberInfo = BRApi.Finance.Members.GetMemberInfo(si, dimtypeid.Scenario, scenarioMember.Name, True) Dim scenarioProperties As ScenarioVMProperties = scenarioMemberInfo.GetScenarioProperties Dim rateHistorical As FxRateType = BRApi.Finance.Data.GetFxRateType(si, "HistoricalRate") Dim scenarioPropertyItem As New VaryingMemberPropertyItem (cubetypeid.Unknown, scenariotypeid.Unknown, dimtypeid.Unknown, False, PropStorageType.GuidType, rateHistorical.UniqueID) scenarioProperties.FxRateTypeForAssetLiability.SetStoredPropertyItem(scenarioPropertyItem) brapi.Finance.MemberAdmin.SaveMemberInfo(si, scenarioMemberInfo, False, True, False, False)
I hope this helps
Can you do us a favor and answer the first question yourself? The community should become a repository of knowledge, and it needs answered questions. The more the better it will get.
- 3 years ago
To change the default description, you need to use the
Dim myMember As WritableMember = BRApi.Finance.Members.ReadWritableMemberNoCache(si, myDimTypeId, myName)
MyMember.Description = "Hi Bharti"