In our current process that we wish to automate, anonymous users use a multistep form to create an Account record, add account attachments in the notes table and also creates contact record associated to the account. Once this is created, internal users evaluate and approve contact records. This would then create a login in the Azure B2C directory and would send an email to the user with the password. User can then log in to the portal and further update the account records including deleting attachment and uploading new ones.
Now we noticed that the initially uploaded documents are uploaded as system user and for some reason the end user does not have the ability to delete the records as shown in the screenshot (first two items). On the other hand if the user is already signed in and uploads another document, the user can then delete that document as seen on the third item in the screenshot.
Please let us know how we can allow signed in users to delete attachments of Account that they are associated with. The table permissions that we have used are as follows -