Hello,
I get the error Path title leads to element. The path should lead to type Edm.PrimitiveType.CDS (annotations) . It happens 9 times for every $Type : and value pair.
The strange thing is even with the error I still see Fiori preview rendering Risks correctly. However, Mitigations and BusinessPartners do not show anything on Fiori preview.
The following is my annotations.cds which is copied from the course content.
// using RiskService as service from '../../srv/risk-service';
using RiskService from '../../srv/risk-service';
// Risk List Report Page
annotate RiskService.Risks with @(UI : {
HeaderInfo : {
TypeName : 'Risk',
TypeNamePlural : 'Risks',
Title : {
$Type : 'UI.DataField',
Value : title,
},
Description : {
$Type : 'UI.DataField',
Value : descr,
}
},
SelectionFields : [prio],
Identification : [{Value : title}],
// Define the table columns
LineItem : [
{Value : title},
{Value : miti_ID},
{Value : owner},
{Value : bp_BusinessPartner},
{
Value : prio,
Criticality : criticality
},
{
Value : impact,
Criticality : criticality
},
],
});
// Risk Object Page
annotate RiskService.Risks with @(UI : {
Facets : [{
$Type : 'UI.ReferenceFacet',
Label : 'Main',
Target : '@UI.FieldGroup#Main',
}],
FieldGroup #Main : {Data : [
{Value : miti_ID},
{Value : owner},
{Value : bp_BusinessPartner},
{
Value : prio,
Criticality : criticality
},
{
Value : impact,
Criticality : criticality
}
]},
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.