Previous Topic

Book Contents

Book Index

Next Topic

Reference Catalog: Attachments of Related Objects

The customization described in this topic should be done by an experienced customizer familiar with the intricacies of template workflows.

If there are any reference catalogs showing attachments of related objects (e.g. in object type 'Change', which has a relation to 'Issue', you see 'Issue' attachments instead of 'Change' attachments; the reference catalog is for the structured attribute "issue.attachments"), then the relations actions 'Add File', 'Add Link', 'Add Hyperlink' and 'Remove' will not be visible. This is a standard behavior of relation actions in reference catalogs for structured attributes.

If you really need to be able to add and remove attachments of the related object (e.g. Issue), do the following:

  1. In the reference catalog 'issue._attachments' on Change view, select 'Customize/Edit Action Mapping For Relation' from the context menu. In the 'Action Customizer' which opens, create new action assignments for this particular relation - select type Valid for 'relation', select the relation attribute in the Attribute combo box, e.g. Change - "issue._attachments" and click on Create Definition. Save and close. You should see the Add <..> and Remove actions in the reference catalog.
  2. Now you need to modify the template WF AddAttachment in the context of each of the Add <...> actions and Remove action. Select 'Edit Workflow AddAttachment' from the context menu on the button to call the template workflow dialog.
  3. In the Template Workflow dialog, select the second (Copy the action and edit...) option.
  4. Change the description of the new action, e.g. "Issue: Attach file and store it in db".
  5. Double click on the customizable Script node 'Get object'

    Help Image

  6. Change the script in the Script Editor. You need to pass the related object (Issue) to the output param "bo".

    Help Image

  7. When you have done this for all the Add<..> actions and the Remove actions, you will need to modify the action assignments for the relation Change - "issue._attachments" in other modes (typically New) and other combinations of Object State fileter (see documentation for Action Customizer).

See Also

Attachments Customization

Dialog: Add Actions to Editor

Reference Catalog: Add Reference Catalog

Reference Catalog: Translation

Enable Simple Search by Attachments

Catalog: Rendering Condition for Objects With Attachments

Duplicate Data Handling