Skip to content

Instantly share code, notes, and snippets.

@AsishP
Created June 28, 2018 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AsishP/70511f5eac4f069d8195ed36301758ab to your computer and use it in GitHub Desktop.
Save AsishP/70511f5eac4f069d8195ed36301758ab to your computer and use it in GitHub Desktop.
//Check the gist code - https://gist.github.com/AsishP/b817455ce58b753e4f02ae5a0482e7a4 for filling the NavIds Array
foreach (int id in navIds)
{
NavigationNode nodeToDelete = web.Navigation.GetNodeById(id);
contextAsset.Load(nodeToDelete);
contextAsset.ExecuteQuery();
nodeToDelete.DeleteObject();
contextAsset.ExecuteQuery();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment