public static void EnsureFieldLookup(this FieldCollection flds, string cInternalName, string cDisplayName, string cFieldDescription, string cGroup, string cListName, string cShowField) { try { if (!flds.HasField(cDisplayName, cInternalName)) { flds.AddFieldLookup(cInternalName, cDisplayName, cFieldDescription, cGroup, cListName, cShowField); } } catch (Exception ex) { throw new Exception(string.Format("Error in extFieldCollection.EnsureField - {0} - {1}", cDisplayName, ex.Message), ex); } }