Answers.Body: <p>I think you can do this by just supplying the aid in the url - see <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration</a></p>
  
  <p>"aid=zzz: ID of the activity to autofill and update"</p>
  
  <p>if you want to avoid changing which contacts are linked to the Activity then you need to also include the cid of 'user 1'in the url, so that they get loaded (privately) on the form too.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-12T08:56:20.320Z
Answers.Text: where do I find the aid?
Answers.UserDisplayName: GN12AD45
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-12T19:38:48.207Z
Answers.Text: ah true - i think we hit this before that the webform doesn't know the Activity ID at the point that it submits, hence you don't have it to send out via a webform email. is user 2 connected to the Activity at the time that it is created? if so how? or is user 2 connected to user 1 via a relationship, or even a chained relationship eg 'vol for Org A' and 'coordinator for Org A' - ie they both have Org A in common?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-13T16:07:00.410Z
Answers.Text: User 1 is a member of an organisation. The activity they create will be connected to the organisation but not a specific individual. User 2 is an anonymous user (the representative for an external organisation, for example) and their email address has been entered into the initial form by User 1. User 2's form is separate to User 1's form but both link to the same activity. We basically need Civi to recognise the activity has been created and automatically send out the 2nd form to User 2 through the email address entered in form 1.
Answers.UserDisplayName: GN12AD45
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-14T01:41:02.670Z
Answers.Text: How many 'current' Activities of this type might User 2 need to access?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-14T09:01:23.270Z
Answers.Text: User 1 will enter the form once and User 2 will also only have to enter their form once. Neither Users will need to or be able to edit their submitted activity. But User 1 will use the same form to enter a different project as an activity and the process will happen again. We have someone currently helping us to implement this process so when we come up with a solution I will try to explain how it was done.
Answers.UserDisplayName: GN12AD45
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-14T09:04:39.867Z
Answers.Text: Also, it's not necessary for the second webform to be sent to User 2 before the Activity has been created. So therefore an ID will exist to be added to form 2. Is it not possible for the webform to be submitted, Civi to recognise this, extract the ID, attach it to the second form for User 2 and then email it to them using the email address entered into the first form?
Answers.UserDisplayName: GN12AD45
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-11T20:47:08.830Z
Answers.LastActivityDate: 2015-08-11T20:47:08.830Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>You need a custom or temp table which holds user1_ID, user2_iD and activity_id 
  <a href="http://book.civicrm.org/user/current/organising-your-data/custom-fields/" rel="nofollow">http://book.civicrm.org/user/current/organising-your-data/custom-fields/</a></p>
  
  <p>So when you are creating the first activity set the activity status to schedule.</p>
  
  <p>Create a new activity Type for your process if needed - </p>
  
  <p>You need to create an extension and use hook_civicrm_post - set the activity to completed 
  <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension</a></p>
  
  <p>If you need more help please let me know - thanks</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-11T09:16:12.487Z
Answers.LastActivityDate: 2015-08-11T09:16:12.487Z
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Body: <p>For example: User 1 completes Webform 1 on Drupal to give details of a volunteering project, which when submitted creates an activity on CiviCRM. </p>
  
  <p>An email then gets automatically sent to User 2 with a link to Drupal Webform 2 for them to fill out different details relating to the same volunteering activity, which when submitted, data gets added to the same activity that User 1 created on Civi, rather than creating a whole new activity.</p>
  
  <p>I have read similar questions and answers but we are not working with CiviCase and I'm a Civi newbie so finding it hard to relate these solutions to our problem. Apologies if this is a bit of a basic issue but any help would be much appreciated.</p>
  
Tags: <drupal><custom-fields><activities><webform-civicrm>
Title: Two users completing separate webforms on Drupal that create one activity on CiviCRM
ThreadText: # Two users completing separate webforms on Drupal that create one activity on CiviCRM
  
  (Asked by: username_0 on 2015-08-10)
  
  For example: User 1 completes Webform 1 on Drupal to give details of a volunteering project, which when submitted creates an activity on CiviCRM.
  
  An email then gets automatically sent to User 2 with a link to Drupal Webform 2 for them to fill out different details relating to the same volunteering activity, which when submitted, data gets added to the same activity that User 1 created on Civi, rather than creating a whole new activity.
  
  I have read similar questions and answers but we are not working with CiviCase and I'm a Civi newbie so finding it hard to relate these solutions to our problem. Apologies if this is a bit of a basic issue but any help would be much appreciated.
  
  **Tags:** drupal, custom-fields, activities, webform-civicrm
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-08-11. Score: 1
  
  I think you can do this by just supplying the aid in the url - see <http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration>
  
  "aid=zzz: ID of the activity to autofill and update"
  
  if you want to avoid changing which contacts are linked to the Activity then you need to also include the cid of 'user 1'in the url, so that they get loaded (privately) on the form too.
  
  > **Comments:**
  > **username_0**: where do I find the aid?  
  > **username_1**: ah true - i think we hit this before that the webform doesn't know the Activity ID at the point that it submits, hence you don't have it to send out via a webform email. is user 2 connected to the Activity at the time that it is created? if so how? or is user 2 connected to user 1 via a relationship, or even a chained relationship eg 'vol for Org A' and 'coordinator for Org A' - ie they both have Org A in common?  
  > **username_0**: User 1 is a member of an organisation. The activity they create will be connected to the organisation but not a specific individual. User 2 is an anonymous user (the representative for an external organisation, for example) and their email address has been entered into the initial form by User 1. User 2's form is separate to User 1's form but both link to the same activity. We basically need Civi to recognise the activity has been created and automatically send out the 2nd form to User 2 through the email address entered in form 1.  
  > **username_1**: How many 'current' Activities of this type might User 2 need to access?  
  > **username_0**: User 1 will enter the form once and User 2 will also only have to enter their form once. Neither Users will need to or be able to edit their submitted activity. But User 1 will use the same form to enter a different project as an activity and the process will happen again. We have someone currently helping us to implement this process so when we come up with a solution I will try to explain how it was done.  
  > **username_0**: Also, it's not necessary for the second webform to be sent to User 2 before the Activity has been created. So therefore an ID will exist to be added to form 2. Is it not possible for the webform to be submitted, Civi to recognise this, extract the ID, attach it to the second form for User 2 and then email it to them using the email address entered into the first form?  
  
  ---
  
  ### Answer by username_2 on 2015-08-11. Score: 1
  
  You need a custom or temp table which holds user1\_ID, user2\_iD and activity\_id
  <http://book.civicrm.org/user/current/organising-your-data/custom-fields/>
  
  So when you are creating the first activity set the activity status to schedule.
  
  Create a new activity Type for your process if needed -
  
  You need to create an extension and use hook\_civicrm\_post - set the activity to completed
  <http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension>
  
  If you need more help please let me know - thanks
  
  
  ---
  
  