CRM Audit info dissapeared

Some of the New Value data might disappear (have the broken icon instead of the value) when you import a solution that disables the Audit of the entity or if the Audit is already disabled and then you enable Audit.
It is a known issue and if you are working on online you will need to create a Service Request to the Support.
If you are OnPrem you will need to run the following SQL script to check and then clean the records:

Select * from AuditBase WHERE action = 104 OR action = 102
Action = 104 | Any Auditing Changes that are made at Organization level would get captured with code 104.

Action = 102 | Any Auditing Changes that are made at Entity level would get captured with code 102.

In order to retrieve the Audit value from the DB, we would need to run the following command:

DELETE from AuditBase WHERE action = 104 AND CreatedOn > ‘<date>’ || Action = 104 or 102, depending on the results we get the above SELECT query

After this, the values will show again.

Advertisements

Cannot insert duplicate key row in object

Yesterday when I was trying to import a solution I was getting this error:

Cannot insert duplicate key row in object ‘MetadataSchema.AttributeLookupValue’ with unique index ‘NDX_AttrLookupValAttrIdEntityIdCompState’. The duplicate key value is (3343d9f8-8b3b-45de-881f-4501a34e29de, 8, 0, fd140aae-4df4-11dd-bd17-0019b9312238, Jan 1 1900 12:00AM) the statement has been terminated.

After some digging and doing some queries on SQL, I was able to identify the field that was giving me the problem. Some search on the web and I found these posts that helped me:

  • In this one it helped on querying the DB in SQL to know the field:
  • In this post, it also says a way to remove the duplicate key row, but it is specific to that case, make sure to have a backup and perform this operation in an isolated environment.
    https://community.dynamics.com/crm/b/crmpowerobjects/archive/2014/02/24/duplicate-key-row-error-during-upgrade-to-crm-2013

  • In this post I found a way to go around the problem but not solving it:
  • Comment (or remove) the field that is giving the error in the solution and then zips it again and import.
    https://www.gittprogram.com/question/847161_errorcode-0x80044150-cannot-insert-duplicate-key-row-in-object-importing-solution-failed-after-upgrade-to-2011.html

    Removing the field from the solution allowed completing the import.

    Hope this helps!

    Microsoft Dynamics CRM 2015 On-Premise Installation

    Installing Dynamics CRM sometimes can be a pain if you are installing it in a client that has many restrictions regarding the login users and access.
    You may face some of this erros when doing and installation.

    Commum errors:
    – SQLSERVERAGENT service is not running (during installation) – The user that was running the installation didn’t had the correct permissions. Using a domain admin account worked.

    – Setupmicrosoft.crm.setup.server.addaspnetserviceaccounttosqlaccessgroupaction failed. Access is denied – the user that was installing CRM had permission of FullControl on the Organization Unit (OU) that was created for this environment but it didn’t had the Delegate Permission. Set that to the user and then it worked fine.

    – CRM 2015 Reporting Extension Setup Error – The SQL Server Reporting Services account is a local user and is not supported – This one I had to change the default Service Account (Report Service) and change to Network Service and apply, Closed Setup of the Reporting Extension and Run it again.

    There are alot more other problems that might occur, these were the ones that I faced recently and at the end it was installed.

    If you need any help, just send a message.

    Hope this helps!

    Data Encryption CRM 2013-2015

    If the Data Encryption is not configured correctly can take to some problems even when you try to configure Dynamics CRM Outlook Client.

    You will get this error message when trying to access Settings -> Data Management -> Data Encryption:

    Data-Encryption-feature

    So if you didn’t configure and you have a new version of CRM 2013/2015 or you’re going to migrate to a new version and going to import the Organization, you should have the Data Encryption Key Activated.

    The method to access it (if you can’t access) is to use the https configuration to have the SSL active and then you can access it, but maybe you don’t want to do it. If so, you’ll need to change a flag in the MSCRM_CONFIG database.

    To do that you’ll need to do the following steps:

    – Open SQL Server Management Studio.
    – Click New Query and select MSCRM_CONFIG database.
    – Run the command:

    UPDATE DeploymentProperties SET BitColumn = 1 WHERE ColumnName = 'DisableSSLCheckForEncryption'

    – IISRESET

    If you want to confirm before what the value of the flag is, just do:

    SELECT BitColumn FROM DeploymentProperties WHERE ColumnName = 'DisableSSLCheckForEncryption'

    Now you can access the Data Encryption option and can activate the Encryption key.

    Afterwards if you want to put the value of the BitColumn to the previous value, you’ll just need to update the table again.

    Hope this helps.

    Creating Virtual Machines

    So, the other day I was creating a Virtual Machine (VM) Windows Server 2008 R2 with SP1, then installed SQL Server 2008 R2 so I could get MS Dynamics CRM 2013 on the machine. First had to add the roles, so the installation would work without problems. The roles I added were: IIS, File System and had to run dcpromo.exe to add a domain to the server because CRM installation needs it.

    When I was installing the SQL Server I’ve put all of the services with the same user (Network Service) and the installation went ok, but after I had to change it to the user is was logged on, because the SQL Agent wasn’t working and was saying that couldn’t start running. After the change it started to work. Had some problems on the Reporting Service too, so had to change it to Local System and started to work fine.

    I’m going to install MS Dynamics NAV 2009 (or maybe 2013) on this machine and Jet Data Manager v12.7.0.

    I’m thinking of doing a VM with Windows Server 2012 and SQL Server 2012 R2 too (CRM 2013, NAV 2013), that way I’ll have a VM with the late versions of softwares available.

    Any questions or help, write on the comments that I’ll try to help.