Define new attachment types to increase the range of files that you can save as data items and reuse in your application, for example, screenshots.
In Dev Studio, create a class for the attachment type that you want to add and specify the following inheritance settings for the class:
- Pattern inheritance from the PegaPs-Data-Attachment class
- Directed inheritance from a subclass of the Data-WorkAttach- class that matches the new attachment type
If the existing subclasses do not cover the attachment type that you want to add, create a new subclass.
For more information about creating classes, see Creating a class.
Override the AttachmentScreen section in the new class to add the fields for the new attachment type that you require, for example, add a drop-down list to specify the category of the attachment.
For more information, see Sections.
Save the SaveAttachment activity of the Data-WorkAttach- class into the new class and change its name to AttachmentSave.