문제

How can I delete a document in a document library with Pnp-Js-Core, but I need the registry to be stored in the recycle bin.

Thanks.

도움이 되었습니까?

해결책

You can use the recycle method of pnp-js.

Try and modify the below code. It will send the document to recycle bin and gives you the guid of the recycle bin item.

$pnp.sp.web.getFileByServerRelativeUrl("/sites/testdev/Documents/presentation.pptx").
recycle().then(function(data){
    console.log(data);
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top