Skip to main content
added 5 characters in body
Source Link
Robert Lindgren
  • 24.5k
  • 12
  • 53
  • 79

I want try to get Infopath form id after add to Formlibraryform library by flowingfollowing code

spFile = fileLibrary.Files.Add(fileName, fileContents, replaceExistingFiles);

and iI can't access spFile.Item.IdspFile.Item.Id because iI added file to Formlibraryform library and iI receive this error:

The object specified does not belong to a list.

The object specified does not belong to a list.

isIs there any efficient way to get id by name? iI tried to get id by file URL but there is no Item.IdItem.Id again.

I want try to get Infopath form id after add to Formlibrary by flowing code

spFile = fileLibrary.Files.Add(fileName, fileContents, replaceExistingFiles);

and i can't access spFile.Item.Id because i added file to Formlibrary and i receive this error:

The object specified does not belong to a list.

is there any efficient way to get id by name? i tried to get id by file URL but there is no Item.Id again.

I want try to get Infopath form id after add to form library by following code

spFile = fileLibrary.Files.Add(fileName, fileContents, replaceExistingFiles);

and I can't access spFile.Item.Id because I added file to form library and I receive this error:

The object specified does not belong to a list.

Is there any efficient way to get id by name? I tried to get id by file URL but there is no Item.Id again.

Source Link
Mehdi
  • 121
  • 4

get Infopath form id after add into Formlibrary

I want try to get Infopath form id after add to Formlibrary by flowing code

spFile = fileLibrary.Files.Add(fileName, fileContents, replaceExistingFiles);

and i can't access spFile.Item.Id because i added file to Formlibrary and i receive this error:

The object specified does not belong to a list.

is there any efficient way to get id by name? i tried to get id by file URL but there is no Item.Id again.