Hide SR Attachment category and URL through extensibility

Through extensibility, you can now control several aspects of the Service Request (SR) Attachments UI component:

  • Change the default Category value (the out-of-the-box default is Miscellaneous).
  • Restrict allowed attachment types, such as permitting only files or only URLs.
  • Hide the Category field in the Attachments component.

For implementations that use a single attachment type and a single default Category for attachments, administrators can hide unused options to simplify the user experience.

Steps to enable and configure

On the Service Request Details page, you can control attachment behavior using the attachmentsConfig in the cx-svc-sr-attachments fragment.

Example:

$base.variables.attachmentsConfig = {
add: true,
addTypes: "all",
category: "MISC",
categoryForCreate: "SELECT_REQUIRED",
download: true,
preview: true,
remove: true,
update: true
};

Similarly, on the Create Service Request page, you can configure attachments using the createAttachmentsConfig in the cx-svc-sr-create fragment. Common options include:

  1. Restrict attachment type (hide URL option)
    Limit “Add” to file uploads only (removes the URL option).
    Property: addTypes
    Value: "file"

  2. Hide the Category field during attachment creation
    To hide the category selection, set the category behavior to null (instead of requiring selection).
    Property: categoryForCreate
    Value: null

  3. Set the default Category
    Property: category
    Values:

  • Miscellaneous: "MISC"
  • Internal: "SVC_INTERNAL"
  • Inline Attachments: "SVC_INLINE"

Tips and considerations

For controlling the allowable attachment types, the following are the valid values for the variable

Supported Values

  • all  = File and URL Attachments
  • file = File Attachments
  • url = URL Attachments
  • Default value: all

Key resources

Access requirements

Visual Builder Studio access is required