cancel
Showing results for 
Search instead for 
Did you mean: 

Relationship between two MBO's

Former Member
0 Kudos

Hi Experts,

     I am developing an application with the relationship between two MBO's.

I created two tables Customers and Orders, I gave a foreign key to Orders table.

Now i created two MBO's by drag and drop those two tables into my mobile application diagram.

and gave relationship between these two MBO's  and deployed in to server.

now i  created the Mobile WorkFlow Forms Editor, then the deployed MBO i.e., Customer MBO drag and drop in to my Mobile WorkFlow Forms Editor's Flow design screen, and add Menu item as Get Customers. By selecting the each customer record that customer details from details talbe and customer orders from orders table should display in the next screen.

i am unable to do that, please suggest me.

Thanks & Regards,

Sravanya.

Accepted Solutions (0)

Answers (2)

Answers (2)

david_brandow
Contributor
0 Kudos

1. Is the relationship a composite relationship? If not, make it a composite relationship.

2. Can you elaborate on what "i am unable to do that" means? What isn't working?

midhun_vp
Active Contributor
0 Kudos

Once the user clicks on one of the customer you want to show another list of orders in the other screen right?In that case you need to write some custom code in custom.js file which is generated automatically.

  • Drag and drop the order MBO to the designer and map the OrderList screen with the detail screen of the Customers. This will give keys available in the OrderListscreen in the Customer detail screen.
  • Drag and drop and list from the controls to the Cutomerdetails screen and map the key of the OrderList screen (I think that would be the name of the MBO).
  • Create a menu item in the custom actions lets say "getoders" and set the properties and online request.
  • This will create a method like  menuItemCallbackPO_Itemsgetoders(); You need to call this method as below inside the custom.js

function customBeforeShowScreen(screenToShow, screenToHide) {

if(screenToHide === "Customers" && screenToShow==="Customer_Details") { //

      

                  menuItemCallbackPO_ItemsGet_Item();

                     

                              return true;

                    }

}

Then it will work as you expected.

- Midhun VP