1
Vote

ListName being passed when ColumnName is expected?

description

There is a call to createLookupColumn(currentWeb, sFinalCaml, sListName) passing in the ListName as the last parameter but it actually seems to be expecting the ColumnName (...string sColumnName) as the last parameter. I changed my version of the code to pass in the column name and it all seems to work fine.
Also, replaced the code "lookupColumn = web.Fields[sColumnName] as SPFieldLookup;" with "lookupColumn = web.Fields.GetFieldByInternalName(sColumnName) as SPFieldLookup;"

comments