Using the out of the box WDE customization framework, is it possible to read from the annex of a custom business attribute?
This worked for me:
Private field:
private readonly IConfigurationService _configurationService;
Your Ctor:
public YourThing(IConfigurationService configurationService)
{
_configurationService = configurationService;
}
Somewhere in your class:
string dispositionBusinessAttributeName = [get your BA name here];
CfgEnumerator cfgEnumerator = _configurationService.RetrieveObject<CfgEnumerator>((ICfgQuery)new CfgEnumeratorQuery()
{
TenantDbid = _configurationService.WorkingTenant,
Name = dispositionBusinessAttributeName
});
CfgEnumeratorValueQuery enumeratorValueQuery = new CfgEnumeratorValueQuery();
enumeratorValueQuery.EnumeratorDbid = cfgEnumerator.DBID;
enumeratorValueQuery.TenantDbid = _configurationService.WorkingTenant;
ICollection<CfgEnumeratorValue> cfgEnumeratorValues = _configurationService.RetrieveMultipleObjects<CfgEnumeratorValue>((ICfgQuery)enumeratorValueQuery);