I'm trying to find the field specified as the identifier for a content type using ModuleBuilderManager but can't figure it out. I thought there would be a flag on DynamicModuleField to indicate it but I can't find it.
Figured it out.
var mbm = ModuleBuilderManager.GetManager();
var mtype = mbm.Provider.GetDynamicModuleTypes().Where(t => t.TypeName.EndsWith(
"[CONTENT ITEM NAME]"
var identifier = mtype ==
? String.Empty : mtype.MainShortTextFieldName;