on 2022 Oct 07 9:36 PM
Hi,
I'm facing a problem when trying to create an entry for the child entity in display mode using SAPUI5/ODATA/BOPF. When pressing on a button, some entries should be created.
My code looks as follows:
var oModel = this.getView().getModel();
var CRUUID = this.getView().getBindingContext().getObject().CRUUID
var sCreationPath = oModel.createKey("/root", { CRUUID = CRUUID, IsActiveEntity = true }) + "/to_child";
var oChange = {}; //for now just empty
oModel.create(sCreationPath, oChange, {
error: function(oError){
debugger;
}
I receive the following error:
"Cannot create an active item for a draft or vice versa"
Message Class: /BOBF/FRW/COMMON/ Number: 135
After some research it seems that I have to do as follows:
"As a developer, you can set the field "IsActiveEntity" of the child instance to the same value as its parent's value. As an end user, report this issue to your IT support."
This is something that I'm stuck on. How do I set the field IsActiveEntity = true on child?
If I provide in the oChange the field { IsActiveEntity : true } it just gets abort status.
Someone who can assist me? I would really appreciate your assistance.
Thanks!
Request clarification before answering.
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.