cancel
Showing results for 
Search instead for 
Did you mean: 

【Fiori element template】How to bind parameter to importFunction(Odata) with UI.DataFieldForAction

Hi Everyone,

I used DataFieldForAction to send action to the imported Function in Odata side. However, I cannot send the parameter which I wanted automatically. After clicking the button, the parameter popup appeared that I have to input it manually. What I want is to send the id(such as order ID number) of selected line to the backend side.

Pic①:The function I created in the Odata side.

Pic②:The annotation related to button which is DataFieldForAction.

Pic③:The result is that I have to input the parameter manually but not bind some field automaticlly.

There must be some other annotation configuration should be set but unfortunately I could not find any hint.

Could some one

help me.

Thanks a lot in advance.

Best regards,

Xin

Accepted Solutions (0)

Answers (3)

Answers (3)

rahullohia
Advisor
Advisor

Hello,

There are two way to do this.

1. The function import parameter name should match the entity field from the source entity set. I think in your case the function import parameter should be 'Ebeln'

2. If you make 'Ebeln' as the key field in your source and match the entity name with your function import field name, then the popup may not even appear as it considers the value by default (Key) and will send the request to backend.

Hope this helps!

Thanks,

Rahul

zoro823
Member
0 Kudos

you should make your import parameter name same as the field name in the entity type.

0 Kudos

Not solved yet..