hi all,
am working on a event receiver wherein i need to read a look up column from the doc lib, the event reciver is fired correctly, [ itemadded eventhandler] when i uploaded a document from my custom web part.
after document is added into the document library along with few metadata columns -w hich contains lookup column, spfield choice, single line of text etc.. i have to read these columns and perform another logic.
but i am not able to read the lookup column .
can an one point me, whats i was missing . when i debugged the code,
if(mitem["mylookupcolumn"] != null ) //here it throws object reference error
{ // my logic }
if (singleItem.Fields[mylookupcolumnname] is SPFieldLookup)
{
SPFieldLookupValue spfieldLookUpValue = newSPFieldLookupValue(singleItem[mylookupcolumnname] as string); /// it thros the //error object reference error
selectedValue = spfieldLookUpValue.
}
help is highly appreciated!
Das