A user trys to add a new currency in Sage CRM and a sql error is shown on the screen.
The following error appears in the ewaresql.log:
Oct 17 2014 7:46:19.258 5208 5244 1 execsql,time,sql,errormsg 219 INSERT INTO Currency(Curr_Symbol,Curr_DecimalPrecision,Curr_Rate,curr_CreatedBy,curr_CreatedDate,curr_UpdatedBy,curr_UpdatedDate,curr_TimeStamp) VALUES (N'USD',2,1.000000,1,'20141017 07:46:19',1,'20141017 07:46:19','20141017 07:46:19')
Cannot insert the value NULL into column 'Curr_CurrencyID', table 'SAGECRM.dbo.Currency'; column does not allow nulls. INSERT fails
From the error message above you can see that the Curr_CurrencyID field is missing from the insert statement.
The cause of this issue was with the properties of the Currency table.
To resolve this issue:
1.First take a backup of the database.
2.Open Microsoft SQL Server Management Studio.
3.Navigate to the dbo.Currency table and right click on it and select Design:
4.Select Curr_CurrenctID and the Column Properties will appear below it:
Notice the Identity Specification is set to no (see highlighted above).
5.To resolve this change the “(Is Identity)” to Yes:
6.Once this is done perform an IIS reset.
7.Now login into CRM and navigate to Admin -> Data Management -> Currency and the user should be able to add in a new currency.
WARNING: The techniques or examples contained in this email are for illustrative purposes only, and have not been tested in a production environment. The techniques or examples used are not necessarily supported features of SAGE CRM, and may not have been previously tested or implemented on a production environment. Before attempting to implement any of these techniques or examples on a production environment, they should be tested thoroughly, as use of these techniques may cause unexpected behaviour. SAGE can accept no responsibility for any issues arising from the use of these techniques. Please ensure that you back up your database and application fully before implementing any changes of this nature.