private static object GetFieldValue(FormContext formContext, string field) { object v = null; if (formContext.EntityModel != null) { v = formContext.EntityModel.GetValue(field); } else { var linkedData = formContext.GetParameter <DynamicObj>(ViewConstant.LinkedData, null); if (linkedData != null) { v = linkedData.Get <object>(field, null); } } if (v is SelectOption) { return(((SelectOption)v).Value); } return(v); }