cancel
Showing results for 
Search instead for 
Did you mean: 

Edit capability in CAP Node.js OData V4

pierre_dominique2
Contributor
0 Kudos

Hi,

I'm using CAP Node.js with OData V4 and I have a Fiori Elements app using the new sap.fe library. There's no Edit button on the Object Page even though my entity is updatable:

<Annotation Term="Capabilities.UpdateRestrictions">
  <Record Type="Capabilities.UpdateRestrictionsType">
    <PropertyValue Property="Updatable" Bool="true"/>
  </Record>
</Annotation>

The Create functionality doesn't work either as there's no navigation to the Object Page in create mode.

Is this a bug?

Cheers,

Pierre

EDIT: cc maksim_pahlberg_amag

T1mey
Participant
0 Kudos

vansyckel

Is this still valid or were there some improvements?

I my case draft handling is really oversized.

Would it be better to stick to ODATA v2 ? What side effects would that have ? Any functions / features of fiori elements affected?

vansyckel
Advisor
Advisor
0 Kudos

Hi Tim,

Yes, this is still valid. AFAIK there are no plans to support non-draft in Fiori Elements v4.

You can switch to Fiori Elements v2 with @sap/cds-odata-v2-adapter-proxy. I'm afraid I can't assist with Fiori Elements related questions.

Best,
Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

vansyckel
Advisor
Advisor
0 Kudos

Hi Pierre,

As of now, Fiori Elements v4 requires draft mode to be enabled.

Best,
Sebastian

pierre_dominique2
Contributor
0 Kudos

Thanks for the confirmation vansyckel.

daniel_endres
Explorer
0 Kudos

Hi vansyckel

just checking in if there anything was added and if it is now possible to edit in v4 without draft mode.

Or if it is on the roadmap.

Regards

Daniel

Answers (1)

Answers (1)

marcmaurí
Participant

Hi Pierre,

As I learned from gregorw, the entity needs to be annotated with @odata.draft.enabled. Is your entity draft enabled?

Best regards,

pierre_dominique2
Contributor
0 Kudos

Hi Marc,

I have another issue when I enable draft and I don't see any reason why we have to enable draft to edit a record.

Pierre