8

I have a Drupal webform that is integrated to my CiviCRM installation and uses numerous custom fields that are associated with a particular activity type. I want to use the form to allow specific contacts to edit an activity that is part of a pre-existing case.

The contact who will be submitting the webform (contact 1) has an assigned role in the case and a relationship to the case manager. We're using Views to show some data to this contact including a link to the webform. I understand that I can pass a case ID and/or an activity ID into the form via the URL that is presented to the contact in the View, and I can see how I can do this by rewriting the output of one of the Views fields.

The question is: do I need to pass in both the case ID and the activity ID, or is it enough just to pass in the activity ID?

And what should I have as the settings for the case and activity in the CiviCRM tab for the webform?

3
  • You may be interested in following the CiviCRM proposal.
    – choster
    Commented Oct 31, 2014 at 15:09
  • @choster - thanks for the heads-up. I've already committed to that.
    – Graham
    Commented Nov 2, 2014 at 8:35
  • Update: I've released this code as 4.x-dev - please test it out :)
    – Coleman
    Commented Nov 17, 2014 at 21:23

2 Answers 2

5

Case and activity settings are a bit tangled up with each other in the current (v4.9) version of the module...

BUT, I've just committed several changes to 4.x-dev (soon to be released as v4.10) which:

  • Support multiple activities and multiple cases on a webform
  • Detach the activity and case tabs from each other so you can more cleanly work with one or the other
  • Allow you to file an activity on a case without having to go through the entire case configuration on the webform

When I get this into working shape (probably next week) I would love your help testing it out.

And to answer your question, if you are updating an existing activity it should be sufficient to pass the activity id. In the current version this will only work if contact 1 is the creator or target or assignee of the activity. I may be able to make this more flexible in the next version.

4

We use Drupal Webform-CiviCRM to create cases, but ofcourse not for the steps you are asking about :-) I would reckon passing in the activityID should be enough, have a play and let me know!

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.