Skip to Content
avatar image
Former Member

Creating new entity using CreateEntry and connection to existing parent entity

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

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

    There is a way.

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

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

    oBinding.aLastContexts.push(oContext);

    oBinding.iLength++;

    oTable.updateItems();

    Add comment
    10|10000 characters needed characters exceeded