I have an issue with CSOM and content type, I used CSOM to read some value in a sharepoint list, it works well until I try to used content type If I create a new content type with my fields, it’s worked but if I add my field in an existing content type. It doesn’t work and that’s return me the following error:
Error: Object reference not set to an instance of an object
the error it’s comming from the first line which try to read my field so in my code here the line:
if (item[l_strUniqueKeyName].ToString() == l_strUniqueKeyValue)
I’ve done a lot of researches but I found nothing related to this issue
Any idea of what I’m doing wrong?
Thank you for your help