Hi All,
I am getting Generic SQL Error when importing a new webresource from one environment to another.
My Error Log says:
Error: <Data ss:Type="String">Cannot insert the value NULL into column 'IsManaged', table '********_MSCRM.dbo.WebResourceBase'; column does not allow nulls. INSERT fails.
I have also tried to create a new webresource in target environment but still getting the same error. I am able to create a new entity and workflow in target environment without any issue.
Please help.
*This post is locked for comments
Hi Guys,
i have checked the database and found no issue in webresource table. On tracing the error i found below error.
Cannot insert duplicate key exception when executing non-query:
insert into [WebResourceBase]([OverwriteTime], [OrganizationId], [DisplayName], [Description], [SolutionId], [ModifiedOnBehalfBy], [CreatedOnBehalfBy],
[Content], [IsManaged], [LanguageCode], [WebResourceType], [CreatedOn], [ComponentState], [ModifiedBy],
[WebResourceId],
[ModifiedOn],
[Name],
[CreatedBy]
)
values
('01/01/1900 00:00:00', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', NULL, NULL, 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', NULL, 0, 1033, 3, '08/02/2018 05:51:28', 0, 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'08/02/2018 05:51:28',
'new_test11.js',
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
Exception: System.Data.SqlClient.SqlException (0x80131904)
: Cannot insert the value NULL into column 'WebResourceIdUnique', table '********_MSCRM.dbo.WebResourceBase'; column does not allow nulls. INSERT fails.
Since WebResourceIdUnique field is an internal field i am unable to figure out how to proceed. Any help would be appreciated.
Hi David,
Thank for your response.
I have already checked the CRM versions of each environment and both DB and CRM versions are same on both environment. My core issue is target environment is not allowing me to create a webresource.
Regards,
Saad
I suggest you check the organisation versions of each environment (you can see this in Deployment Manager), and if there is an option to update the organisation version, then do so. This is because there may be a mismatch in the organisation and CRM versions in each environment
Hi Adrian,
Thanks for your response. I don't have access to target environment database but i have asked the responsible team to look in to the same.
I have already tried creating a webresource manually in target environment but it throws the same exception.
Hi Mohd Saad Akhtar,
The WebResourceBase table is the area where web resources are stored in the database. If you have access to the SQL database it is worth checking this table for anything unusual. If this table is fine, then there could be a problem with the web resources. You might need to recreate the web resources in the target instance manually as a workaround.
Anyone??
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
52
Victor Onyebuchi
6