I want to make a CAML query semi-smart - in that I can give it a Title (which is what the end user sees) and it looks up the appropriate "Title" to pass as part of the CAML query:
var caml = "<OrderBy><FieldRef Name='" + field + "'/></OrderBy>";
It looks like I can iterate of the Fields collection of the list using the object model, and then key off the Title property to compare with what the user sees. My question lies in the usage of StaticName versus InternalName. My gut + the MSDN documentation seem to indicate that InternalName is the right property to use and replace field in the above code - particularly because InternalName can't be modified.
Can anyone shed light on this?