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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Dynamics 2015 (on-premise) - Inserting Contact via SQL, error when trying to delete via CRM

(0) ShareShare
ReportReport
Posted on by

Hi all

I wondered if you could assist.

I am trying to automate the addition of contacts into Dynamics CRM via a web form and have written a SP in SQL in order to do this. It works, but when I come to delete the contact via Dynamics CRM, it gives an error that "Integer Value Out Of Range". I have the option to download the log file which provides the following information:

"A validation error occurred.  The value of 'membercount' on record of type 'list' is outside the valid range."

Please could someone shed some light on what I am perhaps doing wrong?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Royal King Profile Picture
    27,686 on at

    Inserting any record to crm via sql is not supported and if you do system may not work as expected. Stop inserting records using sql sp and use CRM API to insert contact to crm.

  • Community Member Profile Picture
    on at

    Appreciate that this isn't supported.

    Just hoping somebody could assist with a possible workaround for this.

  • Rajkumar Rajaraman Profile Picture
    on at

    Best way as using CRM API

  • Verified answer
    Community Member Profile Picture
    on at

    Thank you for the suggestions.

    I have answered my own question in the end.

    In case anyone is wondering, as I was not only importing a Contact, but also adding this new Contact straight to a Marketing List, the error was occurring when trying to delete Contact via Dynamics because the "MemberCount" of the relevant Marketing List was out of sync (had managed to creep down to 0) so using my SQL stored procedure I am now updating the "MemberCount" field by 1, as and when a new Contact is added and then added to the Marketing List.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans