Hello All,
Object page header title "Unnamed Object" does not get overwritten with below annotation. I would like to assign the "up_product" value to it. Could you please share your comments why would that be?
screenshot-2023-10-03-at-131119.png
schema.cds:
entity Product : managed
{ key id : UUID;
key product : String;
productDetail : Composition of many
{ key id : UUID;
plant : String;
planGroupKey : String;
planGroupCounter : String; }
}
annotations.cds:
annotate service.Product.productDetail with @(UI.HeaderInfo:
{ TypeName : '{@i18n>productDetail}',
TypeNamePlural: '{@i18n>productDetails}',
Title : { $Type: 'UI.DataField', Value: up__product }
});
Best,
Merve
Request clarification before answering.
Hello Merve,
you can find a detailled explanation and annotation examples for correctly setting up the object page header here:
https://ui5.sap.com/#/topic/cce93e6f067a4133a8430c4f5d7b8fc7.html
Please make sure to provide a valid property path for setting header title and description. My assumption is that 'up__product 'can't be properly resolved, which usually results in having 'unnamed object' being displayed. Is 'up__product' a property of the annotated entity, or a navigation property path? In case it is a navigation property path, you have to add an a property of the associated entity to the path, e.g.
<navigation property path name>.<property name>
Please note that you can only use :1 associations for this purpose.
In order to avoid these kind of issues, I strongly recommend to use Fiori Tools Page Map to define title and description, as only valid paths are proposed for selection.
You should also install the VSCode plugin for CDS Language support which provides a syntax check and code completion in annotations.
Regards
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont think you need @
try to use: TypeNamePlural: '{i18n>productDetails}',
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.