0

I'm aware that (integer) ID can't be specified for a list item when it gets created (and why), but it seems like there should be a way for a client to specify the GUID for an item it is creating. This way it doesn't need to re-query in order to know what the item is.

Have I missed some documentation about this or some reason it's not an available feature in sharepoint?

  • Why specify the GUID? Using the SPList.AddItem method returns a SPListItem anyway so you don't need to get it again... – Bunzab May 21 '17 at 13:39
  • Hi @Bunzab E.g. Preparing data offline for migration into lists that have lookup relationships. Ideal to specify IDs on parent items and specify these IDs when preparing data for the lookup property on child items. Better not to have to do the migration in multiple steps. – sasfrog May 21 '17 at 21:11
0

there is a way to set the Item ID value in SharePoint. We can make false the read-only field and set the value of ID.

pleas check the below post for your reference. http://sharepointwalkers.blogspot.in/2012/04/insert-item-in-sharepoint-list-with.html

  • Interesting, I'll have to check this out – sasfrog May 22 '17 at 6:56

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.