Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide text field which comes from @ObjectModel.text.association:'_TextCDS'

IanYin
Product and Topic Expert
Product and Topic Expert
268

Hi everyone,

Is there any way can hide Text fields which comes from @ObjectModel.text.association:'_TextCDS' ?

For example:

I define a field SalesOrganization and get text by annotation:

@ObjectModel.text.association: '_SalesOrganizationText'

SalesOrganization

However it will expose SalesOrganizationName to OData. Which means Metadata will come out an extra text field. It will result in an extra field in the app.

So my question is how to hide this extra text field without changing CDS _SalesOrganizationText.

view _SalesOrganizationText

{

@ObjectModel.foreignKey.association: '_SalesOrganization'

key SalesOrganization,

@ObjectModel.foreignKey.association: '_Language'

@Semantics.language: true

key Language,

@Search.defaultSearchElement: true

@Search.fuzzinessThreshold: 0.8

@Search.ranking: #LOW

@Semantics.text: true

SalesOrganizationName,

};

0 REPLIES 0