Forum Stats

  • 3,853,749 Users
  • 2,264,264 Discussions


When accessing Business Objects copied to a variable, unable to reference a nested object array attr

tinavidhu Member Posts: 41 Blue Ribbon
edited Jun 7, 2018 4:49AM in Oracle JET

I am facing some issues in fetching a Business Object in an editable screen. I have the following structure in the Business Objects.

1. Item BO - Has Item Details

2. CartItem BO - Has Additional details along with the Item Reference as one column.

Cart Item and Item BO have a one-to-one relationship. I need to show all the CartItems and I need to edit them in a single button click from an Edit Page.

I have created the type getall_CartItem in the Page Flow level using the Get all CartItems BO API, and created a cartItems variable of that type in the Editable Page I created. The object structure attached as jpg images.

Problem I am facing is that I am able to access the Cart Item Attributes, such as ContractNum, unitNum, etc. However, I am not able to reference the nested object array attributes of itemObject such as itemImage, itemDesc etc.

When I printed what I obtained as value for the variable, $page.variables.cartItems.items[0].itemObject, it shows [object Object]. However, when I try to print any of the attribute itemDesc or anything, the VBCS instance throws an error. and the page is not rendered. When I try to print $page.variables.cartItems.items[0].itemObject.items in the notification, it just shows blank, and even printing this shows blank, $page.variables.cartItems.items[0].itemObject.items[0] .

Can you let us know where we are going wrong here?

1.jpg 12.1K
2.jpg 10.9K