Maintaining Approval status after restoring list items from recycle bin
-
08-10-2020 - |
题
I have recycled list items using powershell method $deletedGuid = $item.recycle()
. After recycling, I have restored items from recycle bin again using poershell method $site.RecycleBin.Restore($deletedGuid)
script. But after restoring, I see that all restored items have approval status as pending, why is that? Why the items did not maintained their approval status as before recycling?
I remember that some of the items have status as Approved
and some have staus as Draft
before recycling
Is there any possibility to maintain approval status of recycled items?
解决方案
I believe there isn't as the Restore()
function is almost equal to "Add new item". You could have a calculated hidden field which would store the Approval Status. During the restore you could check the value of that column and set Approval Status according to that.