From 81ce71884541a6b64cb85a35be5fb7a887d19ea9 Mon Sep 17 00:00:00 2001 From: PujaDeshmukh17 <126158971+PujaDeshmukh17@users.noreply.github.com> Date: Wed, 11 Jun 2025 19:29:16 +0530 Subject: [PATCH] Update attachment-extension.cds Changes required to add drop down input field. --- .../demoapp/srv/attachment-extension.cds | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cap-notebook/demoapp/srv/attachment-extension.cds b/cap-notebook/demoapp/srv/attachment-extension.cds index 1701fb9a..484331d0 100644 --- a/cap-notebook/demoapp/srv/attachment-extension.cds +++ b/cap-notebook/demoapp/srv/attachment-extension.cds @@ -17,37 +17,43 @@ entity Statuses @cds.autoexpose @readonly { extend Attachments with { statusText : Association to Statuses on statusText.code = $self.status; - Working___DocumentInfoRecordString : String + customProperty1 : WDIRS_CodeList_TYPE @SDM.Attachments.AdditionalProperty: { name: 'Working:DocumentInfoRecordString' } @(title: 'DocumentInfoRecordString'); - Working___DocumentInfoRecordInt : Integer + customProperty2 : Integer @SDM.Attachments.AdditionalProperty: { name: 'Working:DocumentInfoRecordInt' }; - abc___myId1 : String + customProperty3 : String @SDM.Attachments.AdditionalProperty: { name: 'abc:myId1' } @(title: 'id1'); - abc___myId2 : String + customProperty4 : String @SDM.Attachments.AdditionalProperty: { name: 'abc:myId2' } @(title: 'id2'); - Working___DocumentInfoRecordDate : DateTime + customProperty5 : DateTime @SDM.Attachments.AdditionalProperty: { name: 'Working:DocumentInfoRecordDate' } @(title: 'DocumentInfoRecordDate'); - Working___DocumentInfoRecordBoolean : Boolean + customProperty6 : Boolean @SDM.Attachments.AdditionalProperty: { name: 'Working:DocumentInfoRecordBoolean' } @(title: 'DocumentInfoRecordBoolean'); } +entity WDIRSCodeList : CodeList { + key code : String(30) @Common.Text : name @Common.TextArrangement: #TextFirst; +}; + +type WDIRS_CodeList_TYPE : Association to one WDIRSCodeList; + annotate Books.attachments with { status @( Common.Text: {