Determining Identifier Field For Dynamic Module Type
Hi,
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.
Thank you.
Michael
Figured it out.
var mbm = ModuleBuilderManager.GetManager();
var mtype = mbm.Provider.GetDynamicModuleTypes().Where(t => t.TypeName.EndsWith(
"[CONTENT ITEM NAME]"
)).FirstOrDefault();
var identifier = mtype ==
null
? String.Empty : mtype.MainShortTextFieldName;
Thank me!