These days I'm also working on the 'List Migration' feature in my codeplex tool for document and list migration and copy operation.
You can enable moderation on a custom list by using this option under List Settings > Versioning Settings
Once this option is enabled, SharePoint creates two columns(Approval Status, Approval Comments) in a custom list to store the moderation status and comments.
When you write any migration scripts you'll have to take these columns into account as well otherwise all the migrated items will result to 'Pending' approval status.
In order to set these columns programmatically, I'll suggest that you use the following code:
One thing worth mentioning here, people often confuse 'SystemUpdate' with 'Update'. The 'SystemUpdate' will update the contents of a list without changing 'Modified', 'Created' datetime stamps. The update performed using 'SystemUpdate' will note create any additional version(if versioning is enabled). Where as 'Update' updates the 'Modified','Created' timestamps, user information(who has updated) along with the version history(if enabled).
I also noticed, when you create a custom list item inside a folder directory make sure the folder url is in the following format
folderurl: '/lists/{customlist}/{foldername}'.
****** there's no '/' in the end
Majid
I'm senior Developer/Consultant and passionate about Microsoft Technologies including Microsoft 365, SharePoint and .NET. I have been working in this industry for well over 10 years. This blog is all about sharing unique scenarios and tips of my project work which someone else might find handy too.
Subscribe to:
Post Comments (Atom)
Iconise ‘Add Picture’ control in PowerApps
Default look you get for ‘Add Picture’ control is not very appealing for end user and there is no OTB way of specifying icon for this con...
-
There's a very good article on business connectivity services which puts you on the right direction to start things with it. But when a...
-
Powershell command start-job does support running the script block under specified user. The command also supports various other feature w...
-
Popular SQL Grim - How to get around with it: After a long when when I tried to run Share Point on my laptop - rather me seeing the centr...
No comments:
Post a Comment