Unlock-KFItem
Syntax
Unlock-KFItem
[-Handle] <handle>
[-ThrowErrors[:$true]]
Support
>= kenaflow 2.0.3
Return
Boolean.
$true
=> <handle>
was a valid lock and it was release!
$false
=> <handle>
was not a valid lock!
Description
You can lock and unlock SharePoint list items from any workflow.
With this cmdlet you release a previously gathered lock.
Please read this article for further details: Locking.
Parameters
[-Handle] <handle>
This is a lock handle gathered with
Lock-KFItem
.
[-ThrowErrors[:$true]]
This is a default parameter for all kenaflow cmdlets. If set to
$true
(default!) the engine will pass exception within the cmdlet to the script for further handling.
Example
$item = Get-PnPListItem -List "Custom List" -Id 1
$lock = Lock-KFItem -Item $item -MaxWaitInSeconds 10
if( $lock -ne $null ) {
Test-KFItemLock -Handle $lock
Unlock
} else {
Write-KFLog "Cannot get a handle to the SharePoint list item."
}