cancel
Showing results for 
Search instead for 
Did you mean: 

Preventing navigation while clicking an action on an item of a List Report in Fiori Elements

Domae
Participant
0 Kudos

Hey,

I have build a List Report, in which I have defined two inline actions. Each time when I click on those actions the standard navigation is triggered and the app tries to open up the Object Page. Unfortunately I get an error, which says the following:

No 'Edm.Boolean' value found for key 'IsActiveEntity'

So I checked the URL and the app wants to navigate to this route:

.../Codelists(ID=guid'1a25343f-ba26-47a8-957e-7f2aada4ace4',IsActiveEntity=undefined)/

As you can see the IsActiveEntity-Property is undefined. This happens only when I am click on the Button for the Action.

When I click somewhere else on this item, the navigation works as intended.

So my question is: Can I prevent the navigation, when I click on the action button? Because I don't want to navigate to the Object Page, but only to trigger the action.

We are on SAPUI5 1.71.25

Best regards

Dominik

philipdavy
Contributor
0 Kudos

andre.fischer

I am facing the same issue mentioned here while using RAP. Does this bug still exists or is solved ?

Accepted Solutions (1)

Accepted Solutions (1)

Domae
Participant

I solved it myself, by switching the returntype of the action from the actual entity to Integer:

Before:

@odata.draft.enabled
    entity Codelists @(restrict     : [{
            grant : [
                '*'
            ],
            to    : [
                'validationuser',
                'cockpitadmin'
            ]
        }]
    ) as projection on ds.Codelists actions {
        @sap.applicable.path : 'disabled'
        action enable() returns Codelists;
        @sap.applicable.path : 'check'
        action disable() returns Codelists;
    }

After:

@odata.draft.enabled
    entity Codelists @(restrict     : [{
            grant : [
                '*'
            ],
            to    : [
                'validationuser',
                'cockpitadmin'
            ]
        }]
    ) as projection on ds.Codelists actions {
        @sap.applicable.path : 'disabled'
        action enable() returns Integer;
        @sap.applicable.path : 'check'
        action disable() returns Integer;
    }


I tried it with the newest version of UI5 and there it worked also with the entity as return type.

Best Regards

Dominik

Answers (1)

Answers (1)

issabella_martin1995
Participant
0 Kudos

Thanks !! It helped me . I was also facing the same issue .

andre.fischer : hello Sir , though it solved my issue but I am still wondering why RAP does this --

For me the issue happended in RAP (on premise)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you think that this is a bug I would like to ask you to create a ticket so that development can follow up on this.