I have one enum value: LedgerPostingType and I want to use this value and grab the same enum name value from InventAccountType. The thing is, the enum values with the same names on these two enums have different index values (i.e. InventProfit is enum value 93 on LedgerPostingType but value 8 on InventAccountType). I want to convert the enum index value of LedgerPostingType to the name value (InventProfit) and then grab this same enum from InventAccountType. See the code below for what i am trying to achieve (it doesn't compile).
{
str postingTypeForLookupName, inventAccountTypeForLookupName;
LedgerPostinType postingTypeForLookup = GeneralJournalAccountEntry.PostingType;
postingTypeForLookupName = SysDictEnum.index2Label(postingTypeForLookup);
inventAccountTypeForLookup = InventAccountType::postingTypeForLookupName;
}
Thanks in advance