3

Is there a way to increase the size of the Relationship Notes field?

In 4.6, it appears to be stored in the varchar(255) "description" column of the civicrm_relationship table. Nevertheless, Webform-CiviCRM integration let us use a textarea as a widget for this field, and now that the client has become accustomed to the idea of using this field for longer content.

I tried simply increasing the column size in the database and flushing caches, but it does not seem to make any difference by itself; submitting the webform to create the relationship results in the same error:

The CiviCRM "relationship create" API returned the error: "Value for description is 884 characters - This field has a maxlength of 255 characters." when called by function "preSave" on line 187 of wf_crm_webform_postprocess.inc with parameters: "Array ( [relationship_type_id] => 17 [is_active] => 1 [start_date] => now [description] => 884-character description went here [contact_id_a] => 26305 [contact_id_b] => 13475 [is_permission_b_a] => 1 [is_permission_a_b] => 0 [check_permissions] => [version] => 3 ) "

The site is a Drupal 7.44 / CiviCRM 4.6.19 site, with Webform 7.x-4.x-dev and Webform-CiviCRM Integration 7.x-4.15. The ability to add case relationships was added back in 7.x-3.x.

1 Answer 1

2

Modifying field types in CiviCRM is bound to create problems later on (e.g. with upgrades), so I wouldn't do that.

The straightforward approach would be to create a custom fieldset for relationships and add in a new custom field that is large enough for your data. I suspect there might be a few gotchas in terms of accessing this field, but if you're in Drupal, then the entity support in Drupal might solve this.

Apropos of this, here's an article about Drupal that points to how important this kind of fieldable relationship entity can be: http://atendesigngroup.com/blog/drupals-weak-link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.