Forum Discussion

BobNelson's avatar
BobNelson
New Contributor III
2 days ago
Solved

What is Api.Cons.IsCurrency?

I came across this piece of code today: If (((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity())) And api.Cons.IsCurrency()) I'm guessing the last statement is to be sure that ...
  • RobbSalzmann's avatar
    2 days ago

    Yes, Api.Cons.IsCurrency checks to see if the supplied ID is a currency.
    I agree with your analysis "wouldn't this already be accounted for in the api.Cons.IsLocalCurrencyForEntity condition"

    I think you can get the same result with:
    If Not api.Entity.HasChildren() AndAlso api.Cons.IsLocalCurrencyForEntity() Then ...