Hope you are doing well.
I would just like to update you with new stuff which I have learnt recently. So, I will write a piece of code which returns model of specific object, in my case, I will use Class as object but you can use others objects as well. So, here you go.
static void jobGetObjectModel(Args _args)
SysDictClass sysDictClass = new SysDictClass(classNum(YourClass));
select Model, Name, Publisher, DisplayName from sysModelManifest
where sysModelManifest.Model == sysDictClass.treeNode().AOTGetModel()
join firstonly Layer from sysModel where sysModel.RecId == sysModelManifest.Model
&& sysModel.Layer == UtilEntryLevel::sys; // Change layer here
info(strFmt(“Model: %1”, sysModelManifest.Name));
info(“Object is not apart of model in given layer”);
Query will fetch Model, its name, Publisher and DisplayName.
Note: Select layer in which you are looking for…
Thanks and Happy DaXing…