on 04-29-2022 8:57 AM
Hello,
I have defined a unbound action
action stop()<br>
I used the annotation to show a confimation dialog.
annotate Sevice.stop with @(
Common.IsActionCritical : true
);
How ist it possible to read data from the entity?
This brings me a undifined for the field id!
this.on('stop', ({data:{id}}) => {
console.log('stop fired: ' + id );
})
If I defined a action with parameter
action stop(id: entity1:id))<br>
I get now a popup with a input field, which I don't want.
If I try to bound the action, I always get a popup with a dropdown or a input field
actions{
@(
cds.odata.bindingparameter.name : '_it',
)
action stop (
.....
The real question is:
How can I implement a action that opens only a confirmation dialog without a input field, but I can read any parameter of the entity in the implementation?
It is solved! See above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @gwerner,
Can you please share your solution? I also need to hide this dialog.
Thank you!
Hello,
If your action relates to a specific entity it should be bound. Also, does your entity have an uuid key?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tiago,
thank you for your fast answer!
That is right if I implement a bound action like that.
entity E1 as select from my.E1 {
...
} actions{
action stop()
};
But than I got no confirmation dialog. Which will get the first on click on the button.
Ok this implementation is working!
..
} actions{
@Common.IsActionCritical
action stop()
};
regards
User | Count |
---|---|
82 | |
11 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.