web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2011 getting Generic SQL Error when importing a new web resource.

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    on at

    Anyone??

  • Suggested answer
    Adrian Begovich Profile Picture
    1,032 Moderator on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • David Jennaway Profile Picture
    14,065 on at

    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

  • Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans