OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Accounts problem with "add contact" rule

This topic contains 1 reply, has 2 voices, and was last updated by  Dima Soroka 10 years, 2 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #24687

    jevjev
    Participant

    Hi,

    I found problem when I add one contact, then remove that contact, then add the contact again. I know this quite silly to do back-and-forth, but maybe this could help OroCRM to be better.

    The steps how to reconstruct the error:

      go to http://demo.orocrm.com/#url=/account/update/2
      or
      http://localhost:8000/account/update/2 for local

      you’ll see Edit Page for “Accounts/Handy City”

      Click tab “Contacts”, then Click button “+ Add” to open contactDatagrid

      Choose contact “Jerry” & “Roy”, then Click Select Button

      You’ll see “Jerry” & “Roy” name below Contacts section

      Click x button of “Jerry” & “Roy” to remove both name. Or you can do by Click “+ Add” then uncheck the name, then Click Select (to apply & close datagrid).

      Next, Click button “+ Add” again once more, and choose “Jerry” & “Roy” again, then click Select Button

      Name “Jerry” & “Roy” not appear on Contacts section

    When I saw in Chrome Developer Tool – Elements, I found hidden variable for saving added & removed contacts have these values:

    • First values:
      <input type="hidden" id="orocrm_account_form_contacts_added" name="orocrm_account_form[contacts][added]">
      <input type="hidden" id="orocrm_account_form_contacts_removed" name="orocrm_account_form[contacts][removed]">

    • After add contact “Jerry” & “Roy” first time:
      <input type="hidden" id="orocrm_account_form_contacts_added" name="orocrm_account_form[contacts][added]" value="1,3">
      <input type="hidden" id="orocrm_account_form_contacts_removed" name="orocrm_account_form[contacts][removed]">

    • After remove contact “Jerry” & “Roy”
      <input type="hidden" id="orocrm_account_form_contacts_added" name="orocrm_account_form[contacts][added]" value="1,3">
      <input type="hidden" id="orocrm_account_form_contacts_removed" name="orocrm_account_form[contacts][removed]" value="3,1">

    • After add contact “Jerry” & “Roy” for second time:
      <input type="hidden" id="orocrm_account_form_contacts_added" name="orocrm_account_form[contacts][added]" value="1,3,1,3">
      <input type="hidden" id="orocrm_account_form_contacts_removed" name="orocrm_account_form[contacts][removed]" value="3,1">

    Then after “Save” button clicked to save the edit, contact “Jerry” & “Roy” not attached to the Account, I thought because what executed last, if removed action, so Added contacts then Removed contacts immediately.

    Thanks,

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #24688

    Dima Soroka
    Keymaster

    Thanks for this post, we’ll resolve issue in next release. Please use https://github.com/orocrm/crm/issues for issues submission, we have it integrated with our Jira so you’ll be able to track progress as well.

Viewing 1 replies (of 1 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top