When I setup a webform to update existing activities, and I give it cid and activity1 parameters in the URL, the webform loads up contact information and core activity information, but not the custom fields data. The custom fields just stay blank.

My first instinct was to re-examine the permissions, but this is the administrator account (with all Drupal permissions checked), additionally I added the Civicrm ACL permission to view/edit the custom field (not that this should matter) but the issue persists. I can add activities and custom data just fine, display the data using Views, but custom field data just doesn't load up in the webform, it's blank.

How would I go about debugging this? Am I missing something obvious?

I tried to recreate the issue on another instance with the same version of Civi and Drupal, but I couldn't do it, everything just works there.

Civicrm 5.20.0 | Drupal 7.72 (modules up to date) | PHP 7.1.33

  • why not give an example of your url - might need to be aid1= not activity1= (perhaps both work)
    – petednz - fuzion
    Jun 26, 2020 at 21:42
  • what entity are the custom fields on?
    – petednz - fuzion
    Jun 26, 2020 at 21:43
  • oh i see you say that core Activity fields load but not the custom ones. sounds odd.
    – petednz - fuzion
    Jun 26, 2020 at 21:44

1 Answer 1


I have identified the problem.

This occurred only for the activities where the activity participant wasn't set. So it's all about contact record type in the civicrm_activity_contact table. The issue happens when you load the activity where you don't have the target specified (record_type_id = 3). If this happens the activity data loads, but the custom fields data don't. I don't know if this is expected behavior, but I don't think so.

For me the fix is easy, I will just write an SQL query that will add the target contact (which same as the activity creator in my case).

I will create the issue for Drupal Webform CiviCRM Integration module.

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.