Answers.Body: <p>Basically, the webform was unable to update a submission with more than one client. I've had to rethink a couple of things and rely on relationships for the second 'client' so that there is a single Client per Case.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-24T17:58:32.140Z
Answers.LastActivityDate: 2020-04-24T17:58:32.140Z
Answers.UserDisplayName: Rose Lanigan
Answers.Body: <p>Editing webform submissions don't go through to CiviCRM. This just changes the form submission result.</p>
  
  <p>And the URL link is more like <a href="https://www.example.org.uk/formurl?cid1=11446&amp;case1=2055" rel="nofollow noreferrer">https://www.example.org.uk/formurl?cid1=11446&amp;case1=2055</a>. Where CID can be CID1 or CID2 etc depending on which contact(s) you want to pre load into the form. And in the form don't have Update Existing Case set if you are specifying the Case ID in the URL. </p>
  
  <p>Olly</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-24T17:57:26.910Z
Answers.Text: Thanks for the help, I mostly got there in the end. I've had to rethink the Cases so that there is only one Client - that was the main issue. The only (minor) issue is that fields with conditions applied (e.g. if field 1 = yes, then show field 2) don't work, so the user has to fill these in again. It's only about 4 check boxes, so either I live with it, or I create a copy of the webform for editing with no conditions applied.
Answers.UserDisplayName: Rose Lanigan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-07T19:17:24.773Z
Answers.LastActivityDate: 2020-04-07T19:17:24.773Z
Answers.UserDisplayName: Oliver Gibson
Body: <p>I've got a webform that creates a Case and two Contact Records (one of whom is logged in as authenticated user). I want to allow the user the ability to edit the webform. </p>
  
  <p>I've tried two options:</p>
  
  <ol>
  <li>Encouraging them to use this page: mysite.org/node/1/submissions</li>
  </ol>
  
  <p>However, any changes they make are only saved in the webform, and CiviCRM Case info is not updated.</p>
  
  <ol start="2">
  <li>Providing a link &lt; a href="https://mysite.org/amend-individual-grant-application/?cid=[contact_id_b_]&amp;caseid=[id]">View submission</li>
  </ol>
  
  <p>This is slightly odd - it prefills the information, but conditions don't appear to work (e.g. fields are hidden when they should be shown) and I have the same problem as option 1.</p>
  
  <p>I wondered if it's a permissions issue - I gave permission to edit all contacts (since there is more than one contact involved) but there's no equivalent for Cases (only 'access my cases/all cases', which is not quite the same thing).</p>
  
  <p>Any ideas why the information is not saving in CiviCRM?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-07T12:18:07.077Z
Comments.Text: Just checked the error logs:
  The CiviCRM "case create" API returned the error: "Case is linked with more than one contact id. Provide the required params orig_contact_id to be replaced" when called by function "postSave" on line 218 of wf_crm_webform_postprocess.inc with parameters: "Array ( [client_id] => Array ( [0] => 103 [1] => 102 ) [role_15] => Array ( [0] => 102 ) [role_19] => Array ( ) [role_9] => Array ( ) [status_id] => 4 [medium_id] => 3 [id] => 52 [check_permissions] => [version] => 3 ) "
Comments.UserDisplayName: Rose Lanigan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-07T12:20:19.380Z
Comments.Text: I don't want to _add_ a case, I want to update the case - on the webform, under the CiviCRM/Case options, I have set the status that would allow a Case to be updated
Comments.UserDisplayName: Rose Lanigan
Tags: <drupal><webform-civicrm><civicase>
Title: Editing a submission on Drupal Webform - not updating CiviCRM
ThreadText: # Editing a submission on Drupal Webform - not updating CiviCRM
  
  (Asked by: username_0 on 2020-04-07)
  
  I've got a webform that creates a Case and two Contact Records (one of whom is logged in as authenticated user). I want to allow the user the ability to edit the webform.
  
  I've tried two options:
  
  1. Encouraging them to use this page: mysite.org/node/1/submissions
  
  However, any changes they make are only saved in the webform, and CiviCRM Case info is not updated.
  
  2. Providing a link < a href="https://mysite.org/amend-individual-grant-application/?cid=[contact\_id\_b\_]&caseid=[id]">View submission
  
  This is slightly odd - it prefills the information, but conditions don't appear to work (e.g. fields are hidden when they should be shown) and I have the same problem as option 1.
  
  I wondered if it's a permissions issue - I gave permission to edit all contacts (since there is more than one contact involved) but there's no equivalent for Cases (only 'access my cases/all cases', which is not quite the same thing).
  
  Any ideas why the information is not saving in CiviCRM?
  
  **Tags:** drupal, webform-civicrm, civicase
  
  > **Comments:**
  > **username_0**: Just checked the error logs: The CiviCRM "case create" API returned the error: "Case is linked with more than one contact id. Provide the required params orig_contact_id to be replaced" when called by function "postSave" on line 218 of wf_crm_webform_postprocess.inc with parameters: "Array ( [client_id] => Array ( [0] => 103 [1] => 102 ) [role_15] => Array ( [0] => 102 ) [role_19] => Array ( ) [role_9] => Array ( ) [status_id] => 4 [medium_id] => 3 [id] => 52 [check_permissions] => [version] => 3 ) "  
  > **username_0**: I don't want to _add_ a case, I want to update the case - on the webform, under the CiviCRM/Case options, I have set the status that would allow a Case to be updated  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2020-04-24. Score: 2
  
  Basically, the webform was unable to update a submission with more than one client. I've had to rethink a couple of things and rely on relationships for the second 'client' so that there is a single Client per Case.
  
  
  ---
  
  ### Answer by username_1 on 2020-04-07. Score: 1
  
  Editing webform submissions don't go through to CiviCRM. This just changes the form submission result.
  
  And the URL link is more like <https://www.example.org.uk/formurl?cid1=11446&case1=2055>. Where CID can be CID1 or CID2 etc depending on which contact(s) you want to pre load into the form. And in the form don't have Update Existing Case set if you are specifying the Case ID in the URL.
  
  Olly
  
  > **Comments:**
  > **username_0**: Thanks for the help, I mostly got there in the end. I've had to rethink the Cases so that there is only one Client - that was the main issue. The only (minor) issue is that fields with conditions applied (e.g. if field 1 = yes, then show field 2) don't work, so the user has to fill these in again. It's only about 4 check boxes, so either I live with it, or I create a copy of the webform for editing with no conditions applied.  
  
  ---
  
  