Skip to main content

Document as attachment without indexing

It is possible to use the old mode of document creation as an attachment without an indexing form by defining a strategy to activate the Legacymode.

In the following example, attachments with the identifier Appendices use the old mode, the others the new.

LegacyDocumentAttachmentCreationStrategy.registerStrategy(function(task,attachment){
if("Appendices" == attachment.getId()){
return true;

return false;
});

Summary

Attachment summaries can be overloaded using the TaskAttachmentSynopsisHelper API.

Example: Define part summary based on parent task tags

helper = JSAPI.get().getHelperFactory().getTaskAttachmentSynopsisHelper();
helper.register(function (task, definition, attachedComponent, callback) {
new TemplateResolver("TASK").resolveTemplate(task, "${Priority}", function (resolved) {
console.log("Resolved template: " + resolved);
callback.onSuccess(resolved);
});
});

Example: Define the summary of an unsigned attachment

helper = JSAPI.get().getHelperFactory().getTaskAttachmentSynopsisHelper();
helper.register(function(task, definition, attachedComponent, callback){
if(!attachedComponent){
callback.onSuccess("Attachment to define");

else{
//Using the default summary
callback.onSuccess();

});