cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to call static action in controller

JastinC1
Explorer
0 Kudos
1,316

I have implemented a static action in bdef using RAP.

This action contains deep input parameter.

In the fiori custom controller, I am trying to call the action using "invokeaction".

I want to pass parameters of extracted data from an csv.

But since action is bound, it requires a context. I tried ways to create a context but the invoke action always give me these errors:

  •  EditFlow.invokeAction:Error: Pass a context for a bound action
  • Cannot read properties of undefined (reading 'getMetaPath')

JastinC1_0-1748521391297.png

need your advice on how to call an action while passing a deep parameter.

is there way to make the action entity-unbound?

Note: service binding I use is V4 UI.

 

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
SAP Champion
SAP Champion

@JastinC1 

RAP actions are always bound. In the case of static actions, pass the following path when you create a context.

"/entityName/" + namespace + "actionName(...)"

 I have also done it in my blog post.

JastinC1
Explorer
Thank you! Worked like a charm

Answers (0)