on 2024 Nov 21 8:06 PM
Hello everyone,
I'm using CAP(Node.js) with odata(v4) & fiori elements. I've a composition between two entities, lets call them parent and child. They are displayed on the UI such that on the object page of parent entity i have displayed the child entity in the form of Line Items .I have created an action bound with the child entity and it takes an input parameter with a default value, the default value is a field from the parent Entity using the annotation
Request clarification before answering.
Hi,
I guess you are already familiar with the V4 specific section "Default Values for Action Parameters" in page that details the many possible ways in which an action parameter dialog can be supplied with default values - did you try that out? I see it makes no distinction between bound or static (bound to entity) - so it should have worked!
There is also the line: "In multiselection scenarios (when the user has selected multiple table lines to execute a bound action), the parameter value is only prefilled if all source values are the same." which clarifies the behavior in case you are trying to assign a default value using one of the table fields!
Best Regards,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sandeep, Yes i am familiar with this documentation. When i try to use the same method to provide default value in static action it i.e. in.parentEntity.field, it highlights this part and shows the error : "Path in.parentEntity.field leads to Collection(Edm.String). The path should lead to type Edm.String".
It seems that because it's bound to all instances of the entity it can't figure out which particular instance to use to get the data. And the source value in this case will be the same as all instances of the child entity are linked to the same instance of the parent.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.