Skip to content

List operations

Albert Moravec edited this page Mar 15, 2018 · 11 revisions

Load list information

// Load basic information
op.LoadList("List #1") // This also selects the list for further operations
  .Execute(); // Don't forget to execute to actually load the data

// Use custom loader
op.LoadList("List #1", (context, list) => context.Load(list, l => l.EventReceivers))
  .Execute();

Select list to operate on

op.SelectList("List #1") // Now you can manipulate the list

Add column

op.AddColumn("Notes", FieldType.Text)
  .Execute();

Modify column

// Change column type to Choice
op.ModifyColumn("Group", FieldType.Choice)
  .Execute();

Delete column

op.DeleteColumn("Note")
  .Execute();
Clone this wiki locally