When trying to grab a field by guid, do you need to surround the guid with {}? E.g.
field["{xxx343-xx-324-xxx}"]
or
field["xxx343-xx-324-xxx"]
|
When trying to grab a field by guid, do you need to surround the guid with {}? E.g. field["{xxx343-xx-324-xxx}"] or field["xxx343-xx-324-xxx"] |
|||||
|
|
SPListItem has 3 "Item" methods defined that take an identifier between brackets:
You seem to be trying to use item[Guid fieldId], but you are providing a string, not a Guid structure, so in effect you are calling item[string fieldName] and thus SharePoint expects a field name, not a field id. You should be calling your method like so: item[new Guid("{936DA01F-9ABD-4d9d-80C7-02AF85C822A8}"] to properly form a Guid structure. With or without curly braces { } or parenthesis ( ), as the Guid constructor accepts both. Do NOT use square brackets [ ]. |
|||||
|