Get stored value of Entity Relationship property
I am trying to get a stored value in Text1 from an Entity relationship:
This is the code that at least does not give me an error when it executes but it does not return the Text1 value.
' Get relationship
Dim relationship As Relationship = BRApi.Finance.members.ReadRelationshipNoCache(si, DimType.Entity.Id, myEntityID, myParentID)
' Get the properties
Dim memProperties As New VaryingMemberProperties( DimType.Entity.Id, myEntityID, myParentID )
' Get the stored value
Dim Text1Value As String = memProperties.GetEntityRelationshipProperties().Text1.GetStoredValue(myScenarioType.id, myTimeID)
Any help much appreciated.
Hey Marcus,
There is a native easier function to do that :Dim sValue As String = BRApi.Finance.Entity.RelationshipText(si, _ entityId, parentId, textPropertyIndex, varyByScenarioTypeId, varyByTimeId) sValue = BRApi.Finance.Entity.RelationshipText(si, 0, -2, 900100, 0, 2021009000)
But to be honest, I tried it on my side without success. No idea why. It seems pretty straighforward but no success!