Skip to main content
Community site session details

Community site session details

Session Id : bTYzSY+rQ+1nB+2hXIQ0SW
Power Apps - Microsoft Dataverse
Unanswered

Column Security Profile (FLS) and File type field - Create is broken

Like (0) ShareShare
ReportReport
Posted on 29 Mar 2023 16:29:51 by 48

I have a field that is a "File" type, and I had it set it up with Column Security Profile so that a user could "create" but not "update". Ideally, users should be able to upload the file the first time but then not be able to delete it.

 

The problem is that a File type field does not permit uploads until the record is saved the first time (i.e. when the form is in Create mode). 

 

As a developer, the way that column security used to work (to my way of understanding) was that the "create" permitted a user to populate a field, and it was not related to the mode of the form. Now that seems to have changed; Column Security Profile no longer permits a File type field to support the ability "create". Now my users create a record, save it, but they do not have the ability to upload the document because the form is in "update" mode. 

Categories:
  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on 03 Apr 2023 at 18:48:04
    Re: Column Security Profile (FLS) and File type field - Create is broken

    What you found is correct, the File attribute requires that the record is saved first (similar way as it happens with activities). In this scenario FLS will not help you. Probably the easiest way to solve this kind of requirement (let's simplify it with "the user can only upload the first time and not update/delete it") is to create a plugin (probably with a specific security role to act as placeholder for the users that need to have this rule). The user technically will have the right to update/delete the file but the plugin will stop these actions after the first upload.

    hope it helps

  • Eccountable Profile Picture
    48 on 03 Apr 2023 at 17:26:57
    Re: Column Security Profile (FLS) and File type field - Create is broken

    I checked some of my older on-prem, clients and you are right that FLS has not changed. The "File" data type has not been around since 2011, and I have worked with this system since CRM 3 was released. More importantly though, my point is that there is a logic problem in that a File type field does not permit its value to be set while the form is in 'create' mode (obviously because there is no GUID for a "Regarding" to relate to) and if the user has the Update FLS permission on that field in order to initially upload a file, then they also have permission to click the "Delete" button and what my client does not want is the ability for users to replace an existing document with something else. I see a couple ways to handle this:

    1. Write some JS code to hide the delete button
    2. Use a workflow to change the ownership of the record to a "system account" after some conditions are met, and configure the security role so that only owners of the record can change it. This way, all users (except the SA) could locked out of updates. 

    The above options are tedious, and could be avoided if we had FLS Create option for File type fields. Any other suggestions are open for discussion.

  • Fubar Profile Picture
    8,047 Super User 2025 Season 2 on 30 Mar 2023 at 04:05:55
    Re: Column Security Profile (FLS) and File type field - Create is broken

    @eccountable wrote:

     

    As a developer, the way that column security used to work (to my way of understanding) was that the "create" permitted a user to populate a field, and it was not related to the mode of the form. Now that seems to have changed; Column Security Profile no longer permits a File type field to support the ability "create". Now my users create a record, save it, but they do not have the ability to upload the document because the form is in "update" mode. 


    Pretty sure it has been the same since I've been working with it CRM 2011 - either way the behavior is as currently documented.  Create in a Field Level Security Profile is the ability to add a value to the Field when creating the main record.  Update, can make changes to the field value after the main record has been created.

    https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/field-level-security?view=op-9-1#overview-of-field-level-security

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Featured topics

Loading complete