3

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.load(item);
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?

1 Answer 1

4

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

Guid
Specifies a user-customizable unique identifier of an item.

UniqueId
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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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