This topic contains 1 reply, has 2 voices, and was last updated by Dima Soroka 10 years, 3 months ago.
- Topic
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 localyou’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,
- First values:
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.