Hi,
I have a confusing problem.
We have a TBO for one of our types, dwq_document. These documents get assigned a unique number through an SBO.
The problem I'm having is copying documents. I have overridden the doSaveAsNew method in the tbo, and call the SBO from there.
I create a sub folder, add a document to a the clipboard the copy it to the clipboard, the first time it doesn't get a new number. Each time after that it does:
public IDfId doSaveAsNew (boolean shareContent, boolean copyRelations, Object[] extendedArgs)
throws DfException{
DfLogger.debug(this, StringUtils.center("Entered method: doSaveAsNew", 80,"-"), null, null);
try {
DfLogger.debug(this, "isTemplate = " + Util.isTemplate(this) + ".", null, null);
if (!Util.isTemplate(this) ){
DfLogger.debug(this, "This document is not a template. Setting the name.", null, null);
Util.setDocNameWithSBO(getSession(), this);
}
} catch (DfException dfe) {
DfLogger.error(this, SEXP, null, dfe);
}
return super.doSaveAsNew(shareContent, copyRelations, extendedArgs);
}
I have logging enable through log4j. I can see the doSaveAsNew getting called, and it calling the method to set the number.
Any ideas?
Thanks.