4

I want to be able to link to sharepoint documents without having to refer to the document name which may change. Is there anyway to programmatically add a unique key to the meta-data and then somehow use this in a link?

AndyM
  • 3,574
  • 6
  • 39
  • 45

2 Answers2

4

You can link to the ID of the document in the library. That won't open the document, but it will always take you to the correct file, regardless of the file name.

I don't know how you could link directly to the document without the document name.

MrChrister
  • 3,555
  • 5
  • 22
  • 34
2

Every library has a GUID as an identifier. You can programmatically get that GUID and get the url from that.

Mikael Söderström
  • 1,008
  • 8
  • 15