using visual studio C# copy items from one list to another

sweetu ve 291 Reputation points
2021-04-12T05:52:04.88+00:00

I would need to Fetch sharepoint online list and update sharepoint list lookup columns ,multiline text column ,people column , override modified by column .Further copy items from one list to another with same list structure field column types.Appreciate kind help

Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments

4 answers

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. sweetu ve 291 Reputation points
    2021-04-12T15:04:10.707+00:00

    Many Thanks for your help.

    I tried as per your suggested link to copy the list items from source list to destination list and its working fine

    I sincerely apologize for any issue in my understanding also I had some less skills in CSOM .

    For updating list item fields (lookup/multiline text/person field and system Modified By field):
    Please let me know above code of yours should be updated inside the Private static void CreateSPListItems function of the suggested reference link .Additionally I created the source list and destination list manually the fields structure manually.

    Thanks in advance.

    Was this answer helpful?

    0 comments No comments

  3. ZhengyuGuo 9,846 Reputation points Moderator
    2021-04-13T01:24:37.143+00:00

    Hi @sweetu ve ,

    The code sample for updating list item fields (lookup/multiline text/person field and system Modified By field), you can place in static void Main() method:

    87124-snipaste-2021-04-13-09-23-52.png

    Firstly update the item field and then copy into another list.

    Thanks
    Best Regards


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  4. sweetu ve 291 Reputation points
    2021-04-13T07:42:13.84+00:00

    Many thanks again. Thanks a lot for your quick help

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.