CRM 2013 - Does the Plugin or updates via SDK recognize field level securities ? RRS feed

  • Question

  • Hello all,

    I'm trying to determine what is affected by field permissions and what isn't.  I have a custom field on the Account entity with Field Permissions set to Read = Yes and Write = No and it's locked in the UI as it should be.  I then have a plugin (Pre Operation on Update) that updates this field and it works without issue plus XrmToolBox shows the user I'm using has Write access to this field on the Entity.  

    So then I wrote a C# app to connect to my entity and update this custom field, but it does seem to recognize field level securities.  It errors out saying the user doesn't have write permissions on the Entity when field level securities on this field are Write = NO, but when I change it to Write = Yes it works.  Regardless of the Field Level Security settings XrmToolBox shows green for Write plus the plugin works fine.  Just the C# command line app seems to pick-up field level securities.

    So with this what uses Field Level Securities?  I assumed only the UI was affected, but obviously from my testing making changes through the SDK is also affected, outside of the plugin anyway.  And what changed in CRM 2015?  Doing this same test in CRM 2015 the plugin now fails with the Write access issue we were seeing only when running the update from the SDK via C# command line app.  

    Thanks for any advise or input on this.

    Tuesday, September 29, 2015 5:08 PM

All replies

  • I wonder if this is a bug in CRM 2013.  I have confirmed by writing a small test plugin that alters a field on an entity which has field level security enabled with Write = False for the user I'm running the plugin under.  The field is locked on the UI and writing a C# command line app using the SDK also returns an error saying I need Update permissions to write to the field.  I can however write to the field using a Plugin that's running Pre Operation on Update.   This is in CRM 2013.  When I try to do this same test in CRM 2015 the plugin fails as I would expect.  They made some big changes with field level securities in CRM 2015 since default fields can now have this added, so I wonder if they fixed or altered how this works between 2013 and 2015.

    Anyone else ran into this?

    Tuesday, September 29, 2015 6:09 PM
  • AFAIK, there is an enhancement work on Field Level Security from CRM 2013 to 2015.


    Monday, October 5, 2015 7:14 AM