What is the difference between GUID and UniqueId? They are both globally unique ids and from the client side we can see they are not the same:

ctx = new SP.ClientContext();
web = ctx.get_web();
list = web.get_lists().getByTitle("Issues");
item = list.getItemById(1);
ctx.executeQueryAsync(function() { 
  console.log("GUID: " + item.get_item("GUID").toString());
  console.log("UniqueId: " + item.get_item("UniqueId").toString());
  console.log("ID: " + item.get_item("ID").toString());

Results in:

GUID: d2bcec49-5e88-494a-a141-4f4275363d79
UniqueId: 98237e32-67aa-4f95-887c-7567d0ab714e
ID: 1

Server side has SPList.GetItemByUniqueId so does that mean generally UniqueId should be used?


Take a look at http://msdn.microsoft.com/en-us/library/dd961684(v=office.12).aspx.

Specifies a user-customizable unique identifier of an item.

Document Lookup to GUID
Lookup to a GUID for an item.

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.