Check if main account is part of any account structure

Hi,

I wan’t to check if a main account is part of any account structure for current ledger.

I tried using FinancialDimensionValidationService, though this class throws an exception if the main account isn’t a part of any account structure.

The exception thrown is “Function DimensionDefaultingEngine::constructForMainAccountId has been incorrectly called.”

Is there any other helper class for this? Or should i write a query for checking this?

BR

Viper