Posts

Showing posts from September, 2014

Quick Application Logger Code

//todo: check anonymous (elevated privileges?) public class Log {      private const string LogSource = "mYsOURCE" ;      public static void WriteEntry( Exception Event)      {            string sSource = LogSource;            string sLog = "Application" ;            SPSecurity .RunWithElevatedPrivileges(() =>            {                  if (! EventLog .SourceExists(sSource))               ...

how to create taxonomyField with genesis

        [SPGENField(             ID = "{BADCE114-FB99-4F27-A777-030E336D1EFA}",             StaticName = "MMDSubject",             InternalName = "MMDSubject",             DisplayName = "$Resources:Model,Field_MMDSubject_DisplayName;",             CustomType = "TaxonomyFieldType",             Group = "$Resources:Model,FieldGroup_Title;")]         public class MMDSubject : SPGENField<MMDSubject, TaxonomyField, TaxonomyFieldValue>         {             protected override void OnProvisionFinalized(TaxonomyField field, SPFieldCollection fieldCollection, bool isParentList, bool updatedOnly)             {                 SPSite site = fieldCo...