Skip to Content
0

Creating new entity using CreateEntry and connection to existing parent entity

Mar 12 at 05:30 PM

24

avatar image
Former Member

Hello,

I have table bounded to association of entity "Request" with name "ItemSet". Now I want to create new Item without trigger request immediately and see this item in table, with entities already requested from back end.

<Table

items="ItemSet"

/>

oOdataModel.createEntry("ItemSet");

And what to do now to present new record in table without submitChanges() and refresh of table binding (GetEntityset)? Is there any way?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Mar 13 at 08:47 AM
0

There is a way.

var oBinding = oTable.getBinding("items");

oBinding.aKeys.push(oContext.getPath().substring(1));

oBinding.aLastContexts.push(oContext);

oBinding.iLength++;

oTable.updateItems();

Share
10 |10000 characters needed characters left characters exceeded