Steps:
Hello, my name is John, and today we are discussing extending applications using Application Composer.
Step 1In this demo, I will show you how to create a trigger that prevents the creation of records when the trigger condition is met.
We will use Application Composer's expression builder to write the Groovy script for the trigger condition.
Step 2
In this example, we are adding the trigger to a custom trouble ticket application used by sales to resolve customer issues.
Salespeople record their attempts to resolve the customer issue on the Activities tab in each trouble ticket.
Step 3We are adding the trigger to prevent users from creating activities on closed trouble tickets.
Step 4This demo is the first of two demos that show you how to create and test a trigger.
Step 5We want to prevent users from creating activities, so we create the trigger on the Activity object. It's a child object of Trouble Ticket.
Click the Expand button.
Step 6We create the trigger as part of Server Scripts.
Click the Server Scripts link.
Step 7And wew select the Triggers tab.
Click the Triggers tab.
Step 8Let's create the trigger.
Click the Add a new Trigger... button.
Step 9We want to check the ticket status when the user creates the activity, so we keep the default trigger After Create.
Step 10Let's enter an internal name. No spaces permitted.
Enter the desired information into the Trigger Name field. Enter
And a description.
Enter the desired information into the Description field. Enter
To write the script, we'll use the expression builder palette.
Step 13Click the Expand Show Palette button.
Step 14We'll find the field to evaluate on the Fields tab.
Click the Fields tab.
Step 15We are checking the value of a Trouble Ticket field in our script, so let's expand the Activity object.
Click the Expand button.
Step 16And we select Trouble Ticket to view its fields.
Click the Trouble Ticket object.
Step 17Now let's find the Status field.
Click the button of the scrollbar.
Step 18Click the Status cell.
Step 19Let's enter the first part of our script.
Enter the desired information into the Expression field. Enter
Click the Insert button.
Step 21Click in the Expression field.
Step 22Now let's finish entering the script.
Enter the desired information into the Expression field. Enter
We are done, so let's validate.
Click the Validate button.
Step 24We can safely dismiss this warning.
Click the OK button.
Step 25Now let's add the error message we want to display to users when they try to create the activity on a closed ticket.
Click the Expand Error Message button.
Step 26Enter the desired information into the Error Message field. Enter
We are done.
Click the Save and Close button.
Step 28In the next demo, we'll test the trigger.
Step 29In this demo, you learned how to create a trigger for an object in Application Composer.
You can find additional learning resources in your Oracle Fusion Help application, as well as in the Oracle Learning Library, and at Oracle University. Thank you.
Step 30