Forum Discussion

PrithviK's avatar
PrithviK
New Contributor III
3 years ago

Auto Translation Property having junk values

We are having typical issue with Metadata, it's a single currency application. The Auto Translation for Currencies property is Blank and doesn't have any value. But when I check System diagnostics I notice that for all Entities(~12k) this property is having value and there is a warning. If I go into the property and see there is no value in the Stored Value, but "Remove Stored Item" property is enabled which is saying that there is some hidden value. I had to manually goto each and every member and click on "Remove Stored Item" property to get rid of the value. Reloading the metadata with this property set to BLANK is also not helping solve the issue.

How can this be resolved without manually updating each Entity. Any thoughts anyone ?

  • Do you have any idea, how you got there?

    AutoTranslationCurrencies can be set by scenariotype and manually only allows you to select application currencies. Had your application other currencies in the past? Is it possible, that your metadata have a spaces in the quotes? This can happen, if you generated the metadata with an excel template.

     

     

    <property name="AutoTranslationCurrencies" scenarioType="" value=" " />
    instead of
    <property name="AutoTranslationCurrencies" scenarioType="" value="" />

     

     

    If you have a space, it might be responsible for your problem, another load with "" should solve the problem.

     

    If this is not working, you can use a business rule to clear the auto translate setting.

    But please test it extensively before running the business rule on a productive application.

     

     

    Dim dimPkOfDimension As DimPk = BRApi.Finance.Dim.GetDimPk(si, "YourEntityDim")
    Dim parentMemberId As Integer = BRApi.Finance.Members.GetMemberId(si, dimtypeid.Entity, "YourTopEntity")
    Dim listOfEntityMembers As List(Of Member) = BRApi.Finance.Members.GetDescendants(si, dimPkOfDimension, parentMemberId)
    For Each entityMember As Member In listOfEntityMembers
    	Dim entityMemberInfo As MemberInfo = BRApi.Finance.Metadata.GetMember(si, DimTypeId.Entity, entityMember.MemberId, True)
    	entityMemberInfo.GetEntityProperties.AutoTranslationCurrencies.RemoveAllStoredPropertyItems
    Next

     

     

    It worked on my demo application.

  • Yes, an extender BR is perfect. If you place it under unknown, you can run it directly from the BR. 

  • ChristianW's avatar
    ChristianW
    Valued Contributor

    Do you have any idea, how you got there?

    AutoTranslationCurrencies can be set by scenariotype and manually only allows you to select application currencies. Had your application other currencies in the past? Is it possible, that your metadata have a spaces in the quotes? This can happen, if you generated the metadata with an excel template.

     

     

    <property name="AutoTranslationCurrencies" scenarioType="" value=" " />
    instead of
    <property name="AutoTranslationCurrencies" scenarioType="" value="" />

     

     

    If you have a space, it might be responsible for your problem, another load with "" should solve the problem.

     

    If this is not working, you can use a business rule to clear the auto translate setting.

    But please test it extensively before running the business rule on a productive application.

     

     

    Dim dimPkOfDimension As DimPk = BRApi.Finance.Dim.GetDimPk(si, "YourEntityDim")
    Dim parentMemberId As Integer = BRApi.Finance.Members.GetMemberId(si, dimtypeid.Entity, "YourTopEntity")
    Dim listOfEntityMembers As List(Of Member) = BRApi.Finance.Members.GetDescendants(si, dimPkOfDimension, parentMemberId)
    For Each entityMember As Member In listOfEntityMembers
    	Dim entityMemberInfo As MemberInfo = BRApi.Finance.Metadata.GetMember(si, DimTypeId.Entity, entityMember.MemberId, True)
    	entityMemberInfo.GetEntityProperties.AutoTranslationCurrencies.RemoveAllStoredPropertyItems
    Next

     

     

    It worked on my demo application.

  • PrithviK's avatar
    PrithviK
    New Contributor III

    Hey Chris - I think you were right with your first point. We had some other currencies previously in the system and then we had removed them in App currencies, maybe those values have remained as Junk.

    Also yes I used - <property name="AutoTranslationCurrencies" scenarioType="" value="" /> but still it didn't work.

    I am testing your rule, put that under Extender Biz Rule and triggering from DM step, Is that the right way ?

    • ChristianW's avatar
      ChristianW
      Valued Contributor

      Yes, an extender BR is perfect. If you place it under unknown, you can run it directly from the BR. 

  • naveen1's avatar
    naveen1
    New Contributor II

    Auto Translation Property will impact the systeam performance in consoladation?