Table of Contents

Search

  1. Preface
  2. Introduction
  3. IDD Concepts
  4. Implementation Process
  5. IDD Configuration Manager
  6. Manual IDD Configuration
  7. IDD Global Properties
  8. Sizing and Platform Requirements
  9. Application Components
  10. IDD Security Configuration
  11. Data Security
  12. Example Role-Based Security Configuration
  13. Data Masking
  14. Siperian BPM Workflow Engine
  15. Locale Codes
  16. Troubleshooting
  17. Glossary

Data Director Implementation Guide

Data Director Implementation Guide

Custom Action with Callback

Custom Action with Callback

A custom action can also include a callback.
This is useful when the external process invoked by the custom action can modify data in the subject area. After making this modification, the custom action can invoke the callback to instruct the IDD application to refresh the subject area.
IDD defines a JavaScript function named refreshObject to refresh the subject area. This function requires one parameter - the internal IDD ID of the modified record. To make this ID available to external applications, the custom action's HTTP request should pass it as a parameter (in this case, the external application can get this ID from a request and pass it back to the IDD application). To add an internal record ID to an action's URL, a dynamic URL parameter with bddParamName='SiperianRowID' should be added to the URL definition (see the example of a callback action definition later in this section).
When a callback custom action is invoked, IDD opens a modal window containing the element <iframe>, which displays the HTML page received as a result of the action's HTTP request. This HTML page is able to call the refreshObject function using the following JavaScript code:
var modifiedRecordID = // get modified record ID from HTTP request var opener = window.parent.dialogArguments; opener.refreshObject(modifiedRecordID);
The modal window where the result of the action's request is displayed can be accessed from JavaScript as window.parent. For example, an HTML page generated as a response to an action can contain the following JavaScript function, which closes the action's modal window and refreshes IDD views:
function closeWindowAndRefreshBDD() { var modifiedRecordID = // get modified record ID from HTTP request var opener = window.parent.dialogArguments; opener.refreshObject(modifiedRecordID); window.parent.close(); }
Due to browser security restrictions, the HTML page is able to call the JavaScript function defined in the IDD application only if this page is located in the same domain as the IDD application (this page is served by the same application server in which the IDD application is deployed).
Here is an example of the callback action defined for SubjectArea:
<subjectArea name="Organization" displayName="Organization"> <primaryObject hmEntityTypeUid="Organization"> <subTypeQualifier columnUid="C_PARTY|PARTY_TYPE" filterValue="Organization"/> <layout columnsNum="3"> <column columnUid="C_PARTY|ORGANIZATION_NAME" editStyle="FIELD" required="true"/> … </layout> </primaryObject> <externalLinkAction callback="true" name="organization _callback_action" displayName="Org Callback"> <externalLink name="org_name_google_search_action_link" type="IFRAME" url="http://external/application/url"> <param name="InternalID" bddParamName="SiperianRowID"/> <param name="organization_id" bddParamName="C_PARTY|ROWID_OBJECT"/> </externalLink> </externalLinkChild> … </subjectArea>
If an IDD application user opens an Organization with ROWID_OBJECT=1222 and then invokes this custom action, IDD opens a modal window displaying the page requested from the following URL:
http://external/application/url?InternalID=BASE_OBJECT.C_PARTY|1222&organization_id=1222
This page can then call the IDD application's refreshObject JavaScript function with the parameter 'BASE_OBJECT.C_PARTY|1222' (this is internal ID of the opened Organization record), which causes the IDD application to refresh all views opened for this record.

0 COMMENTS

We’d like to hear from you!