• Austin P.ax231
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

All,

I'm getting a null value being returned when utilizing the GetField method:

Code snippet below:

System.Reflection.FieldInfo fi = sObj[j].GetType().GetField("Booked_Revenue_Goal__c",System.Reflection.BindingFlags.IgnoreCase);

When I look at the sObj[j].GetType() results I notice some errors that have been returned (Highlighted in RED).

Any advice will be appreciated.  Thanks in advance!

{Name = "Participant__c" FullName = "RSM.BDC3.DataAccess.SFDC.Participant__c"}

[System.RuntimeType]: {Name = "Participant__c" FullName = "RSM.BDC3.DataAccess.SFDC.Participant__c"}

base {System.Reflection.MemberInfo}: {Name = "Participant__c" FullName = "RSM.BDC3.DataAccess.SFDC.Participant__c"}

Assembly: {RSM.BDC3.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null}

AssemblyQualifiedName: "RSM.BDC3.DataAccess.SFDC.Participant__c, RSM.BDC3.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

Attributes: Public | Serializable | BeforeFieldInit

BaseType: {Name = "sObject" FullName = "RSM.BDC3.DataAccess.SFDC.sObject"}

ContainsGenericParameters: false

DeclaringMethod: 'sObj[j].GetType().DeclaringMethod' threw an exception of type 'System.InvalidOperationException'

DeclaringType: null

FullName: "RSM.BDC3.DataAccess.SFDC.Participant__c"

GenericParameterAttributes: 'sObj[j].GetType().GenericParameterAttributes' threw an exception of type 'System.InvalidOperationException'

GenericParameterPosition: 'sObj[j].GetType().GenericParameterPosition' threw an exception of type 'System.InvalidOperationException'

GUID: {4391e7b1-c90f-3df1-9475-c383263e473a}

HasElementType: false

IsAbstract: false

IsAnsiClass: true

IsArray: false

IsAutoClass: false

IsAutoLayout: true

IsByRef: false

IsClass: true

IsCOMObject: false

IsContextful: false

IsEnum: false

IsExplicitLayout: false

IsGenericParameter: false

IsGenericType: false

IsGenericTypeDefinition: false

IsImport: false

IsInterface: false

IsLayoutSequential: false

IsMarshalByRef: false

IsNested: false

IsNestedAssembly: false

IsNestedFamANDAssem: false

IsNestedFamily: false

IsNestedFamORAssem: false

IsNestedPrivate: false

IsNestedPublic: false

IsNotPublic: false

IsPointer: false

IsPrimitive: false

IsPublic: true

IsSealed: false

IsSerializable: true

IsSpecialName: false

IsUnicodeClass: false

IsValueType: false

IsVisible: true

MemberType: TypeInfo

Module: {RSM.BDC3.DataAccess.dll}

Namespace: "RSM.BDC3.DataAccess.SFDC"

ReflectedType: null

StructLayoutAttribute: {System.Runtime.InteropServices.StructLayoutAttribute}

TypeHandle: {System.RuntimeTypeHandle}

TypeInitializer: null

UnderlyingSystemType: {Name = "Participant__c" FullName = "RSM.BDC3.DataAccess.SFDC.Participant__c"}