0
votes

I am developing web portal for Microsoft Dynamics CRM 2013 performing CRUD. I am facing problem while creating Account record. Account Entity have option set industry type, I am trying to set it from web portal. I have written.

    Entity account = new Entity("account");
    account["name"] = txtAccountName.Value;
    account["industrycode"] = new OptionSetValue(int.Parse(selectIndustryType.Value));
    proxy.Create(account);

I can create account record only by using name as it is mandatory. Whenever I try to create account record with option set value, CRM throwing System.Security.SecurityException exception. what could be the problem?

1
System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #810A1FC2 is the exception caughtNachiket

1 Answers

2
votes

The SDK actually allows you to create a record without supplying all of the required fields, so that is not the issue. It sounds like the user you are connecting to CRM with doesn't have the appropriate permissions to either the account or something that is triggered by the account creation.

I have seen this error before when I failed to add the user I was using to connect to the CRM organization.

You can dig deeper into the error by turning on tracing on the server using https://crmdiagtool2011.codeplex.com/ and reading the trace logs using https://crmtracereader.codeplex.com/