In my project, I have to upload a new file to SharePoint library which base on specific existing item.
For example:
The original library have 2 items which has 10 custom columns:
itemA: c1 c2 c3 c4 c5 c6 c7 c8 c9 c10
itemB: v1 v2 v3 v4 v5 v6 v7 v8 v9 v10
But now, I have to upload a new item (itemC) which its all columns value are clone from itemA (include build-in columns, Author,Editor, etc.).
Now:
itemA: c1 c2 c3 c4 c5 c6 c7 c8 c9 c10
itemB: v1 v2 v3 v4 v5 v6 v7 v8 v9 v10
itemC: c1 c2 c3 c4 c5 c6 c7 c8 c9 c10
I have tried to get all columns and its value, dataType via SPFieldCollection. However, there are too many columns (75) which I don't know which one should be kept.
var interalName = field.InternalName;
var TypeDisplayName = field.TypeDisplayName;
var dataType: field.Type;
var value = item[interalName];
Result: too many, I list 3 of those build-in column:
--------------------------------------
field name: MetaInfo
field TypeDisplayName : Lookup
field dataType: Lookup
field value: vti_thumbnailexists:BW|false
------------------------------------------
field name: DocIcon
field TypeDisplayName : Computed
field dataType: Computed
field value: png
-----------------------------------------
field name: _EditMenuTableStart2
field TypeDisplayName : Computed
field dataType: Computed
field value: 146