cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDK - How to access object information from a Card Collection?

emorales
Explorer
0 Kudos
528

Hello community !

I have an MDK application which on the home page has a Card Collection:

emorales_0-1726515219157.png

When you click on one of the cards, navigation to a details page is activated:

emorales_1-1726515269234.png

But when I get to this screen, I see everything empty:

emorales_2-1726515360746.jpeg

How can I access the object I select? Is there a way to send the object ID between views and access specific information about a particular object? In the detail view I am using "Key Value Item" type controls.

Navigation is simple, I don't know if I need to configure something extra here:

emorales_3-1726515456889.png

Thanks for your help ! 

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes, I have confirmed there appears to be a bug related to the context / binding on the Card Collection.  You can work around it using a rule to set the action binding based on the selected card in the short term and I will open an internal issue to work on a solution.

Here is an example rule that gets the card binding and calls setActionBinding() to correctly set the default binding object before navigating to the next page.

/**
 * Describe this function...
 * @Param {IClientAPI} context
 */
export default function CardToDetail(context) {
    let selectedCard = context.getParent().binding;
    context.getPageProxy().setActionBinding(selectedCard);
    context.getPageProxy().executeAction({
        "Name": '/SCN_00033/Actions/GenericNavigation.action',
        "Properties": {
            "PageToOpen": "/SCN_00033/Pages/SampleServiceV4_SalesOrderItems/SalesOrderItems_Detail.page"
        }
    });
}