Difference between revisions of "Custom Form Actions"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 11: Line 11:
The action can run against a single record, multiple records (via [[More Actions]]), or both single and multiple records.
The action can run against a single record, multiple records (via [[More Actions]]), or both single and multiple records.


:''Compare to [[Workflows#About States, Actions, and Decision Boxes|Actions in Workflows]] and [[Manage Related Information]]''
== Single Record and Group Actions in the User Interface ==
===Single Record Actions===
===Single Record Actions===
For a single-record action, the user visits the record and then invokes one of the action button(s) in the heading bar. (The buttons they see depend on the actions that have been implemented and the user's permissions.)
For a single-record action, the user visits the record and then invokes one of the action button(s) in the heading bar. (The buttons they see depend on the actions that have been implemented and the user's permissions.)
Line 22: Line 19:
:[[File:RecordActions-Multiple.png]]
:[[File:RecordActions-Multiple.png]]


== Add an Action ==
===Learn More===
''Compare to:''
:* [[Workflows#About States, Actions, and Decision Boxes|Actions in Workflows]]
:* [[Manage Related Information]]
Β 
==Working with Actions==
Β 
=== Add an Action ===
Follow these steps to add an action:
Follow these steps to add an action:
# Click '''Designer > Data > Objects > {object name} > Actions'''
# Click '''Designer > Data > Objects > {object name} > Actions'''
# Click the '''Add Action''' button
# Click the '''Add Action''' button
# In the Action Information Section, complete the following information:
# Fill in the Action settings
# Click '''[Save]'''
Β 
=== 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
# Modify the Action settings.
# Click '''[Save]'''
Β 
=== 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
Β 
==Action Settings==
Β 
===Action Information section===
#Provide basic information:
#;Name:Unique name for the action
#;Name:Unique name for the action
#:Use alphanumeric characters and underscores
#:Use alphanumeric characters and underscores
Line 43: Line 67:
# If ''Execute JavaScript'' was selected, enter the JavaScript
# If ''Execute JavaScript'' was selected, enter the JavaScript
#:'''Tip:''' Use the [[Template Variable Tool]] to get available [[#Template Variables|Template Variables]]
#:'''Tip:''' Use the [[Template Variable Tool]] to get available [[#Template Variables|Template Variables]]
# Select the user [[Roles]] which can execute the action
# Click '''[Save]''' button.


===Considerations===
===Packaging Options Section===
Choose whether or not allow an installer to disable the action.
Β 
===Available Roles section===
Select the user [[Roles]] which can execute the action. The action only appears for users in those roles.
Β 
====Considerations====


:*If [[#Template Variable|Template Variable]]s are used in the Component and JavaScript code:
:*If [[#Template Variable|Template Variable]]s are used in the Component and 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:
:*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:
::*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''
:::''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:
====Requires Record Selection during Group Operation====
Β 
:::''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''
Β 
===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===
====Template Variables====
{{:Template Variables for Actions and Components}}
{{: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 '''[Save]'''
== 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
<noinclude>
<noinclude>



Revision as of 23:52, 1 August 2011

Designer > Data > Objects > {object} > Actions

Custom actions can be created and invoked when displaying data records.

About Actions

An Action can execute any of the following:

  • A component which is an element written in HTML and JavaScript
  • 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

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

Single Record Actions

For a single-record action, the user visits the record and then invokes one of the action button(s) in the heading bar. (The buttons they see depend on the actions that have been implemented and the user's permissions.)

File:RecordActions-Single.png

Multiple Record Actions

For multiple-record actions, the user selects records in a View, and then uses the More Actions dropdown to invoke the desired action.

File:RecordActions-Multiple.png

Learn More

Compare to:

Working with Actions

Add an Action

Follow these steps to add an action:

  1. Click Designer > Data > Objects > {object name} > Actions
  2. Click the Add Action button
  3. Fill in the Action settings
  4. Click [Save]

Edit an Action

Follow these steps to edit an action:

  1. Click Designer > Data > Objects > {object name} > Actions
  2. Click the title of the action
  3. Click the [Edit] button
  4. Modify the Action settings.
  5. Click [Save]

Delete an Action

Follow these steps to delete an action:

  1. Click Designer > Data > Objects > {object name} > Actions
  2. Click the title of the action
  3. Click the [Delete] button

Action Settings

Action Information section

  1. Provide basic information:
    Name
    Unique name for the action
    Use alphanumeric characters and underscores
    Title
    Field display label
    Type
    Select the type of action:
    • Invoke Component
    • Invoke Page
    • Execute JavaScript (single-record action only)
  2. If Invoke Page or Invoke Component was selected, select it from the list
  3. Select the invocation point:
    • Single Record: The action works on a single record
    • Group Action: The action works on a group of records selected in a View
    • Both: The action can works on both single records and groups of records
  4. Optionally, unclick the Enabled checkbox to disable the action
  5. Optionally, click the Requires Record Selection during Group Operation checkbox (this option appears only when Group Action is selected as the invocation point)
  6. If Execute JavaScript was selected, enter the JavaScript
    Tip: Use the Template Variable Tool to get available Template Variables

Packaging Options Section

Choose whether or not allow an installer to disable the action.

Available Roles section

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

Considerations

  • 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
  • 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

Requires Record Selection during Group Operation

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 not checked, the Group Action can execute when no records are selected

Template Variables

Template Variables for Actions and Components [[Category:Template:Features]]