2

Which CSOM c# or PowerShell Code I would have to use, to pin a document or link in a modern document library to the top? I want to provision a document library, with one document which should be pinned on top by default.

2

Create a yes/no column ("IsPinned") on the library and sort your view by that column. You don't need any code.

  • That's not what I meant. I want to provision a document library, with one document which should be pinned on top by default. – tommypage777 Nov 21 '18 at 11:39
  • Agree with @DerekGusoff - this is a good approach and "does the job". The document will always be first on top. If You want, You can do this with code (PowerShell or C#) – Kristaps Vilerts Nov 21 '18 at 11:47
  • The question is: what are the code lines to do that (how to PROGRAMMATICALLY...) – tommypage777 Nov 21 '18 at 13:40
  • Fine, create the isPinned property in code. A Google search should help you with that. It's the only way to store the pinned state of a document or list item. – Derek Gusoff Nov 21 '18 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.