Showing posts with label spfx listitem breakpermission using pnp. Show all posts
Showing posts with label spfx listitem breakpermission using pnp. Show all posts

Sunday, 17 March 2019

Break Permission on ListItem using pnp




private BreakInheritPermissionListItem():void
{
pnp.sp.web.lists.getByTitle("Employee").items.getById(9)
.breakRoleInheritance(true).then(function(response)
{
console.log("Item Permission breaked successfully");
}).catch(function(exception)
{
alert("Something went wrong :"+exception);
});
}