Configuring a view to open only on the success of an API
About this task
If you want Sterling Selling and Fulfillment
Foundation to
open a view only when an API returns success, you must configure that
specifically.
To configure a view to open only on the success of
an API:
Procedure
Configure an action to call an API.
Note: You must define your action code with a certain naming
convention to avoid any discrepancy with the application's default
action codes. For example, the custom action code can be prefixed
with a EXTN_.
Configure your JSP to detect the specified attribute in
the output XML of the API and store that attribute in a specified
custom attribute of the HTML.
On the client side, write an onLoad function that searches
for the specified custom attribute and then uses the showDetailFor() JavaScript function to switch
to the screen you want.