0

When you click open an item in an external list, you have a url like this:

DispForm.aspx?ID=__ck8100530003000300030013008300g40000300&Source=http%3A%2F%2Fswsudc07%3A9200%2FLists%2FQuote%2FQuote%2520List%2Easpx&ContentTypeId=0x0

I want to know how the ID=__ck8100530003000300030013008300g40000300 is generated, so I can open an item from elsewhere.

I'm using SP 2013.

2
  • Can you please confirm which version of SharePoint you are using? In the versions of SharePoint I've seen, the ID number is a positive integer. Nov 26 '13 at 22:52
  • My answer below should work with SP2013 as well. Good luck. Nov 26 '13 at 23:39
0

When you create an item in a list, SharePoint assigns it a unique ID that it keeps for its entire life. This ID is what you are seeing in the URL for DispForm.aspx. If you need to be able to create URLs that link directly to a specific item, you will need to query the SharePoint list to get the ID, and then generate the URL yourself.

Two easy ways to query a SharePoint list's items programmatically are using the REST API or Web Services, namely Lists.GetListItems.

If you do not need it to be 100% programmatic, you might simply create a view that shows the list item's ID, export your list items to Excel, and then build links using Excel's HYPERLINK function.

7
  • Hi again, I'm trying to open this list item from another external list (a WIP list), to open the original Quote item for this particular WIP (in a modal dialog). Do you know if I should use a calculated column or if there's other ways to do it? Thanks again!! :)
    – Kris
    Nov 26 '13 at 23:58
  • Yes, you can use a calculated column, but it will not be clickable. Here's an idea on how to make it clickable. blog.pathtosharepoint.com/2008/09/01/… Nov 27 '13 at 0:55
  • Thanks!! I'll give it a try now! just wondering if it's possible to open in a modal dialog..?
    – Kris
    Nov 27 '13 at 1:46
  • Yes, if the link you generate points to DispForm.aspx like above. Nov 27 '13 at 1:55
  • In the REST API link, it says: PartsDataContext context = new PartsDataContext( new Uri("localhost/sites/sharepointlist/_vti_bin/listdata.svc")); The only link I can find is: swsudc07:9200/_vti_bin/listdata.svc it seems 2010 and 2013 has a different structure..?
    – Kris
    Nov 27 '13 at 3:58

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.