AgileApps Support Wiki Pre Release

Difference between revisions of "Custom Form Actions"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Β 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Designer > Data > Objects > {object} > Actions'''
'''[[File:GearIcon.png]] > Objects > {object} > Custom Form Actions


Custom actions can be created and invoked when displaying data records.
Custom actions are displayed in '''Actions''' list in the sidebar, when the user is viewing a record.
__TOC__
__TOC__
==About Actions==
==About Actions==
An Action can execute any of the following:
An Action can invoke either: Β 
* A [[Components|component]] which is an element written in HTML and JavaScript
:* A [[Pages|page]] which is a standard JSP (JavaServer Page) page with custom user interface elements or an independent tab
* A [[Pages|page]] which is a standard JSP (JavaServer Page) page with custom user interface elements or an independent tab
:* [[JavaScript]] that uses [[AJAX and REST]] to interact with the platform
* JavaScript that uses [[AJAX and REST]] to interact with the platform


The action can run against a single record, multiple records (via [[More Actions]]), or both single and multiple records.
==Working with Actions==


:''Compare to [[Workflows#About States, Actions, and Decision Boxes|Actions in Workflows]] and [[Manage Related Information]]''
=== Add an Action ===
To add an action:
# Click the '''Add Action''' button
# Fill in the Action settings
# Click '''[Save]'''


=== Edit an Action ===
To edit an action:
# Click the title of the action
# Click the '''[Edit]''' button
# Modify the Action settings.
# Click '''[Save]'''


== Single Record and Group Actions via the User Interface ==
=== Delete an Action ===
For a single record, a user invokes the action button(s) from within the record - note the action buttons located in the heading bar:
To delete an action:
:[[File:record.gif|none|thumb]]
# Click the title of the action
# Click the '''[Delete]''' button


ForΒ  multiple records, a user invokes the action via [[More Actions]]:
==Action Settings==
:[[File:moreactions.gif|none|thumb]]


== Add an Action ==
===Action Information section===
Follow these steps to add an action:
:;Name:Unique name for the action
# Click '''Designer > Data > Objects > {object name} > Actions'''
::Use alphanumeric characters and underscores
# Click the '''Add Action''' button
:;Title:Field display label
# In the Action Information Section, complete the following information:
:;Type:Select the type of action:
#;Name:Unique action name
::* Invoke Page
#:Use alphanumeric characters or underscore
:::* Select the page from the list
#;Title:Field display label
::* Execute JavaScript (single-record action only)
#;Type:Select the type of action:
:'''Invocation Point:'''
#:* Invoke Component
::* '''Single Record:''' The action works on a single record
#:* Invoke Page
<!--
#:* Execute JavaScript
::* '''Group Action:''' The action works on a group of records selected in a [[View]]
#::[[File:actiontype.gif|none|thumb]]
::* '''Both:''' The action works on both single records and groups of records
# If a page or component is selected, specify a name
::: ''Note:'' The Group Action and Both options are not present if the action type is Execute JavaScript.
# Select the invocation point:
-->
#* Group Action: The action runs against multiple records
:'''Enabled -''' Uncheck this box to disable the action.
#* Single Record: The action runs against a single record
<!--:[[#About Requires Record Selection during Group Operation|Requires Record Selection during Group Operation]] checkbox
#* Both: The action can run against both a single record or multiple records
::This option appears only when ''Group Action'' is selected as the invocation point)
# Optionally, click the [Enabled] checkbox to make the action immediately available
-->
#Optionally, click the [[#About Requires Record Selection during Group Operation|Requires Record Selection during Group Operation]] checkbox (this option appears only when Group Action or Both are selected as the invocation point)
: '''JavaScript'''
#:[[File:actions.gif|none|thumb]]
:: This section appears if ''Execute JavaScript'' was selected. Use it to enter the [[JavaScript]].
# If ''Execute JavaScript'' is selected, enter the JavaScript
{{Note|To run the JavaScript in the LongJump UI and the legacy AgileApps UI, enter the script in the Legacy UI Script tab. To run the JavaScript in the New AgileApps UI, enter the script in the New UI Script tab.}}
#:Tip: Use the Template Variable Builder, which provides a list of available [[#Template Variables|Template Variables]]
:: Use the [[Template Variable Tool]] that appears under it to get available [[Template Variables]]
# Select the user [[Roles]] which can execute the action
<!--
# Click the '''Save''' button.


===Considerations===
===Packaging Options Section===
Choose whether or not allow an installer to disable the action.


:*If [[#Template Variable|Template Variable]]s are used in the Component and JavaScript code:
-->
===Available to Roles section===
Select the user [[Roles]] which can execute the action. The action button appears only for users in those roles.
<!--
====Considerations====
:*If [[Template Variable]]s are used in the JavaScript code:
::*The Template Variable '''''will not''''' be replaced if the Action is invoked from a Group Action.
::*The Template Variable '''''will not''''' be replaced if the Action is invoked from a Group Action.
::*The Template Variable '''''will''''' be replaced if the Action is invoked from a Single Record (i.e., the 360 degree view)
::*The Template Variable '''''will''''' be replaced if the Action is invoked from a Single Record
Β 
:*Warning Messages:
::*If the Action type is ''Invoke Component'', this warning message is displayed when the invocation point is selected as Group Action or Both:
Β 
:::''WARNING! Template variables used in component other than User category will not be replaced by its corresponding values if Invocation Point is Group Action/Both''
Β 
::*If the Action type is ''Execute JavaScript'' this warning message is displayed when the invocation point is selected as Group Action or Both:
Β 
:::''WARNING! Template variables used in JavaScript other than User category will not be replaced by its corresponding values if Invocation Point is Group Action/Both''


===About Requires Record Selection during Group Operation===
====Requires Record Selection during Group Operation====
The ''Requires Record Selection during Group Operation'' option defines the type of Group Action to create. Β 
The ''Requires Record Selection during Group Operation'' option defines the type of Group Action to create. Β 
*If checked, the Group Action requires that a record is selected in order to execute the action
:*If checked, the Group Action requires that a record is selected in order to execute the action
*If not checked, the Group Action can execute when no records are selected
:*If not checked, the Group Action can execute when no records are selected
Β 
-->
===Template Variables===
<noinclude>
{{:Template Variables for Actions and Components}}
Β 
== Edit an Action ==
Follow these steps to edit an action:
# Click '''Designer > Data > Objects > {object name} > Actions'''
# Click the title of the action
# Click the '''Edit''' button
# Edit the action.
# Click the '''Save''' button
Β 
== Delete an Action ==
Follow these steps to delete an action:
# Click '''Designer > Data > Objects > {object name} > Actions'''
# Click the title of the action
# Click the '''Delete''' button
Β 
Β 
Β 
[[Category:Objects| 4]]


<noinclude>[[Category:{{features}}]]</noinclude>
[[Category:Object Aspects]]
[[Category:Glossary]]
</noinclude>

Latest revision as of 06:35, 28 August 2018

GearIcon.png > Objects > {object} > Custom Form Actions

Custom actions are displayed in Actions list in the sidebar, when the user is viewing a record.

About Actions

An Action can invoke either:

  • A page which is a standard JSP (JavaServer Page) page with custom user interface elements or an independent tab
  • JavaScript that uses AJAX and REST to interact with the platform

Working with Actions

Add an Action

To add an action:

  1. Click the Add Action button
  2. Fill in the Action settings
  3. Click [Save]

Edit an Action

To edit an action:

  1. Click the title of the action
  2. Click the [Edit] button
  3. Modify the Action settings.
  4. Click [Save]

Delete an Action

To delete an action:

  1. Click the title of the action
  2. Click the [Delete] button

Action Settings

Action Information section

Name
Unique name for the action
Use alphanumeric characters and underscores
Title
Field display label
Type
Select the type of action:
  • Invoke Page
  • Select the page from the list
  • Execute JavaScript (single-record action only)
Invocation Point:
  • Single Record: The action works on a single record
Enabled - Uncheck this box to disable the action.
JavaScript
This section appears if Execute JavaScript was selected. Use it to enter the JavaScript.

Notepad.png

Note: To run the JavaScript in the LongJump UI and the legacy AgileApps UI, enter the script in the Legacy UI Script tab. To run the JavaScript in the New AgileApps UI, enter the script in the New UI Script tab.

Use the Template Variable Tool that appears under it to get available Template Variables

Available to Roles section

Select the user Roles which can execute the action. The action button appears only for users in those roles.