cancel
Showing results for 
Search instead for 
Did you mean: 

Cant update object page header

10-03-2023 1:14 PM
cbsmerveguel Explorer
1890 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

c-kobo
Product and Topic Expert
Product and Topic Expert
0 Likes

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

cbsmerveguel
Explorer

Hi Christian,

Thanks a lot for all the info, I was able to solve the issue with your the points you've made.

Basically, the "Title" annotations should have been made at the "Product" entity rather than "productDetail". This information was clear to me when I used it with "Show Page Map".

Answers (2)

Answers (2)

cbsmerveguel
Explorer
0 Likes

Hi Ajit,

Thanks a lot for your reply. The "TypeNamePlural: '{i18n>productDetails}'" annotation effects the title of the table and not the header of the Object page. And if I delete the "@" sign, then it can't find the needed i18n property. So, I believe we need this "@" sign.

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes

I dont think you need @

try to use: TypeNamePlural: '{i18n>productDetails}',