In this section, we will create Simple search page to display payment terms from fusion.
Step1: Create Backend and Service Connection with Fusion.
Navigate to VBCS—> Backend.


As we need to call fusion REST API, select “Oracle Cloud Applications Instance”.
Provide fusion instance details with URL and authentication details.

Click on Create.

Backend is created now.
Let us create service connections based on this backend.
Navigate to VBCS —>Service Connections.

For fusion REST API, select “select from Catalog” as shown below:

Select “Enterprise Resource Planning and Supply Chain” as shown below:

It will start loading all REST endpoints from fusion.


Provide valid service connection name and Search for required REST endpoint for Payment Terms.

Click on Create.
This will create a new service connection with the below REST endpoint.

Step2: Create a Page to display Payment Terms.
Create Web applications.

Click on Create.

Create Input Text field and Button to search Payment Term in form Layout region.

Change Max Columns =2 and Label Edge =Start.
Drag and drop Input Text field on this form Layout.

Add Button now to add search functionality.

Add table components to display results.

Step3: Create Item type and ADP variable to store REST API response.
Navigate to VBCS–>main-start page —>Types.

Select “From Endpoint” from LOV.
Select service connection and endpoint which are created in the earlier step.

Click on Next.

Click on Finish.
New type is created now.

Create an ADP variable based on this type.


Now assign this variable to Table region.

Click on Expression Editor to select the ADP variable.

Click on Save.

Click on Edit Table Columns.

Run the application.

Step4: Create Page Load Event to display table data on Page load.
vbEnter event listener is used to trigger action before page load in VBCS.
Let us create a new action under the vbEnter event listener.


Select vbEnter from the list of values and click on Next.

Select “Create Page Action Chain” and click on Finish.

Click on “Go to Action Chain” under vbEnterListener.
Now we will call the REST API for payment Terms, and we will assign the REST API response to the ADP variable.


Click on Select.



Click on the Expression Editor.

Click on Save.

Run the application.

Here we can see, on page load, data is getting displayed on page.
Step5: Add Search Logic on Button.
Assign value selected in Payment Term field to variable.


Click on Create.

Let us event listener and action chain on button click.

This will create a new action chain. We will call the REST API for payment terms in action.

Click on q parameter.

Click on Save.
Expression:
“Name='”+ $variables.Var_PaymentTerm + “‘” |
---|
Let us assign result of this REST API response to ADP variable.

Run the application.
Provide Payment Term Name as “Net 30” and click on Search.

We can also add below like expression in query parameter also:
“Name LIKE ‘%”+$variables.Var_PaymentTerm +”%'” |
---|
Result:
