The following is the code which is used to move the selected documents by getting the selected document ID’s and moving it to the folder by enabling the new folder
var viewPanel=getComponent(”viewPanel1″);//get the componet of viewPanel
var docIDArray=viewPanel.getSelectedIds(); //get the array of document ids
var i;
database.enableFolder(”Temp1");
var projects:NotesView=database.getView(”Temp1");
var ndc:NotesDocumentCollection=projects.getAllEntries();
ndc.removeAllFromFolder(”Temp1");
if(docIDArray.length!=0)
{
for(i=0;i<docIDArray.length;i++)
{
var docId=docIDArray[i];
var doc:NotesDocument=database.getDocumentByID(docId);
doc.putInFolder(”Temp1");
}
}
var viewPanel=getComponent(”viewPanel1");//get the componet of viewPanel
var docIDArray=viewPanel.getSelectedIds(); //get the array of document ids
var i;
database.enableFolder(”Temp1");
var projects:NotesView=database.getView(”view name“);
var ndc:NotesDocumentCollection=projects.getAllEntries();
ndc.removeAllFromFolder(”Temp1″);
if(docIDArray.length!=0)
{
for(i=0;i<docIDArray.length;i++)
{
var docId=docIDArray[i];
var doc:NotesDocument=database.getDocumentByID(docId);
doc.putInFolder(”Temp1″);
}
}
No comments:
Post a Comment