Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
CSSubmitRecord
artor
Hi,
I am writing a code to delete file from workarea as well as from staging area and it works fine when file exist in both workarea and staging area and file gets deleted.
After deleting the same file from workarea and staging area, if i recreate the file with same name in workarea and don't submit to staging area and then delete the file from the code, it deletes the file from the workarea but file remain there in a disabled form with cross sign(that usually happen when file exist in staging area).
I am using CSSubmitRecord object to check whether this file exist in staging area or not and it works fine as it shows null when file exist in workarea but not in staging and it works same as in above scenario but i get the error if i use CSWorkarea.submitDirect method in above scenario, please let me know if I recreate the deleted file (from workarea and staging area) in workarea and then delete again, it won't show with cross sign in workarea.
CSVPath vpath = new CSVPath(fileN);
CSFile file =client.getFile(vpath);
CSSubmitRecord cr=file.getSubmitRecord();
file.delete();
CSHole hole = (CSHole)client.getFile(vpath);
if(cr!=null){
CSWorkarea wa= client.getWorkarea(hole.getVPath().getArea(), false);
CSPathCommentPair fileP = new CSPathCommentPair(hole.getVPath().getAreaRelativePath(), "Submit Delete");
CSPathCommentPair[] files = new CSPathCommentPair[1];
files[0] = fileP;
wa.submitDirect("Submit deleted file", null, files, CSWorkarea.OVERWRITE_ALL);
}
Regards
A
Find more posts tagged with
Comments
There are no comments yet