Do I need to get all fields from my list template? How can i do this?
var web = site.OpenWeb(); var template = web.ListTemplates["SomeTemplate"]; template ... ???? -There is no method to get fields.
There is no built-in method for retrieving all fields from a list template. The only way to get the fields is to separate the "XML schemas" in the list and get all the <Field>and tags <FieldRef>.
<Field>
<FieldRef>
It is easier to create an instance of the list, which you can request later with the following examples.
To get all fields from a list, you can use a property SPList.Fields, for example. So:
SPList.Fields
foreach (SPField spField in myList.Fields) { //your code here }
MSDN SPListItem.Fields
" " SPListItem.Fields . SO-: , SharePoint Client?
SPListItem.Fields
Source: https://habr.com/ru/post/1794114/More articles:A method for analyzing barley? (YAML-CPP) - yamlJava polymorphism - case study - javaNitrogen - Dynamic event generation - erlangMySql inserts from one table to another, where the field is not zero - mysqlПриложение Rails 2.x для RubyMine 3.1 - rubyHow to avoid column name conflicts? - sqlObjectForScripting с несколькими интерфейсами не работает - javascriptDefining html5 data attribute in MVC - html5qt preprocessor - c ++Cross subdomain Administrator login with login - djangoAll Articles