Skip to content

SRS Option

An option is an action that can be executed by the user. It can be a link to another view, a command executed on the server, or a link to an external resource

Attributes

All required fields are marked as required; the rest are optional.

  • name (required): The name of the option.
  • command: Multiple values available, separated by commas.
  • title: Title associated with the name.
  • label: Label for the option.
  • acl: Permission settings for the option.
  • css: CSS class for styling.
  • scope: Limits the scope of the option to a single command in the user interface.
  • opts:
    • uimenu: Renders directly in the options menu without a dialog.
  • type:
    • pa_post_many: Executes a POST request with an array of selected objects.
    • pa_post_single: Executes a POST request with a single query object.
    • pa_post: Executes a POST request with a single object.
    • pa_blink: Opens an external link in a new window.
    • pa_elink: Opens an external link in the same window.
    • pa_download: Downloads a file from an external link.
    • pa_info : simple msg , required value
    • v_(Name_of_the_component): Opens the specified component (given in the Name_of_the_component section) at the top of the SRS view. The type name must start with the 'v_' prefix.
    • default: Internal link, server side variables are replaced with values Parameters

Examples

XML
1
2
3
4
5
6
7
8
<srs title="Hello World">
  <def>
    <itm model="option" label="Pokaż wszystkie zamówienia" css="xd-success"  scope="orders" 
    >/srs/301-zamowienia-lista/view?firmid={firmid}&amp;date_to=&mp;</itm>
    <itm model="option" css="xd-success" label="Remove Selected" scope="documenttypes"  type="pa_post">/api/srs/delete</itm>
    <itm model="option" label="Create account" css="xd-success"   type="pa_elink" >/pages/crm/account</itm>
  </def>
</srs>

Option type="pa_post"

Type pa_post require opts="clipboard" on command

XML
1
2
3
4
5
<srs title="Hello World">
  <def>
    <itm model="option" label="Zapisz zaznaczone priorytety" type="pa_post">/api/srs/506-api-nest-set/run</itm>
  </def>
</srs>
XML
1
2
3
4
5
6
7
8
9
<srs>
  <def>
    <itm>
      <![CDATA[
        update table set x= @column where y=@column
        ]]>
    </itm>
  </def>
</srs>

Display custom component

Type attribute must start with the 'v_' prefix and contain the name of the component.

XML
1
2
3
4
5
<srs title="Hello World">
  <def>
    <itm model="option" label="Report time, resources" type="v_timesheet" />
  </def>
</srs>