Skip to Content
0
Jan 19, 2021 at 01:34 PM

​How can i get CDS records Where createdBy == auth user?

58 Views Last edit Jan 19, 2021 at 02:30 PM 6 rev

How can i get records according to createdBy column id CDS?

I have set an authentication with approuter, and set the entity to managed

schema:

 entity Items : managed,cuid  {
      key ID : UUID;
      name : String(111);}

srv:

  entity Items as SELECT from E {*,<br>
    <--THIS IS NOT WORKING-->
    E.createdBy = $user.id; 

  } excluding { createdBy, modifiedBy };