DCRM OnPremise - 2013 : Problem - An account/contact can be created with blank name from C# code RRS feed

  • Question

  • Hi All,

    Currently I am working on account and contact entity of DCRM 2013 OnPremise.

    I found that we can create an account/ contact with blank name (server doesn't give any error) but it is not possible from UI. Same happens with OnDemand.

    Is it limitation of server ?

    Monday, January 5, 2015 6:44 AM

All replies

  • Hi,
    it's not a limitation of the server, but you have this behavior because the field is only mandatory (business required) on the CRM Web UI. There isn't a constraint at internal level to prevent the blank for that fields.
    If you want to force to don't have blank names, you need to create a synchronous plugin (that will be triggered also when the record is created from C# code) in order to check if the field is blank or not, if it's blank you can throw an InvalidPluginExecutionException to stop the creation process.

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Monday, January 5, 2015 7:57 AM