Little reminder about something that has just kept me busy for the last hour or so – internal field names in SharePoint lists have a max length of 32 characters. SharePoint treats this a little bizarrely – it will create the column but then truncate the internal field name. Thus is you’re doing this programmatically – and then depending on the column existing with that particular field name, things will fall over. You’ll probably see an error like
‘Column [your column name] does not exist. It may have been deleted by another user.’
Well, in this case, that other user happens to be SharePoint. Helpful.