How to locate Check Constraint Definitions

While working in CRM, there may be situations when a Check_Constraint error is received.
You can quickly locate the definition for a Check Constraint with the following script:
 
select definition 
from sys.check_constraints
where name = 'CK_Name_Here'
 
Here is an example for better understanding.
 
Error received when attempting to conduct an Import Process in CRM:
 
Check Constraint Error Example
 
Updated SQL Script to run against database:
 
select definition 
from sys.check_constraints
where name = 'CK_CREDITCARD_CREDITCARDFIELDSREQUIRED'
 
Results of Script:
 
([CREDITCARDTOKEN] IS NULL OR NOT [CREDITCARDTOKEN] IS NULL AND len([CARDHOLDERNAME])>(0) AND [EXPIRESON]<>'00000000' AND len([CREDITCARDPARTIALNUMBER])>(0))
 
What the Constraint means:
 
What this is telling us is that the import will only be able to process successfully in one of two scenarios, in reference to the Credit Card Token.
 
One of the situations below must evaluation True in order to pass the Check Constraint criteria:
 
1. When there is no Credit Card Token at all
2. If there is a Credit Card Token, then the record needs to have a Card Holder Name, Expires On date, and Partial Credit Card Number.
 
Likely scenario that is preventing the Import from working is that there is a Credit Card Token in the Import file, but no Card Holder Name, Expires On date, and Partial Credit Card Number.

Environment

 Blackbaud CRM
 4.0

Was this article helpful?


Thanks for your feedback! Did this solve your issue?

Comments (optional):


Thanks for your feedback!
We're glad it was helpful but sorry it didn’t solve your issue. If you need assistance, click Chat with Support below.
We’re sorry to hear that. Please tell us why.

 I don't like how this works.

 The answer is confusing.

 The answer didn't match what I was searching for.

Additional Comments (optional):


Thanks for your feedback! If you need assistance, click Chat with Support below.
Thanks for your feedback. Help us make our products even better by sharing details in our Idea Banks or our online Community.
Thanks for letting us know. We'll work on clarifying the information in the article. If you need assistance, click Chat with Support below.
Thanks for letting us know. We'll work on updating the search engine to return more relevant results.