вторник, 31 августа 2021 г.

Get the Enum name or value via SQL for D365F&O

Hello. Today I'm gonna show you how you can get the enum value based on the enum name from D365F&O. Frequently, it's quite hard to find proper enum value for some base enum, for example, InventTransType. And what if you know only the system name, but not the Id or Label and you wanted to find it as quickly as possible? Below you may find the SQL script to get all you need at once:
select t1.*, t2.* from ENUMIDTABLE t1 inner join ENUMVALUETABLE t2 on t1.ID=t2.ENUMID where t1.NAME='InventTransType'
And here what you've got
I hope that information will be useful for you. Happy DAXing!