| Project: | Salesforce Suite |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When creating a new field map, not checking the Automatically Populate Salesforce checkbox should mean that nodes will not be automatically exported on creation.
The attached patch fixes salesforce_api_fieldmap_options so it will correctly filter on the automatic field when the function call requests that it does so. Once this is done, the unchecked checkbox is correctly respected.
Although this patch does not address the following, these seem like additional problems with this check box:
There is no way to edit the checkbox once a field map has been created. It would seem that this checkbox should be part of what one has access to when editing the field map, or some other means should be provided to change one's mind about this setting.
Also, to me it doesn't make sense that a node automatically exports on update even if the automatic checkbox is unchecked. It would seem that either both creation and update should export automatically, or neither should. If that linkage is not desired, then we need two checkboxes: one for auto-populate on create; and a second for auto-populate on update.
| Attachment | Size |
|---|---|
| salesforce_filter_by_automatic.patch | 1.15 KB |
Comments
#1
Sid_M, With regards to the patch, I think it make more sense to add a WHERE clause to the SQL instead. However I think that the third parameter (
$automatic) ofsalesforce_api_fieldmap_options()is redundant and should be removed, which would change this patch completely.The reason I think the
$automaticparameter should be removed fromsalesforce_api_fieldmap_options()is that there is only one case where it is used; insf_node_nodeapi(). And there it is not used to populate a FAPI element (which is whatsalesforce_api_fieldmap_options()was meant for). Insf_node_nodeapi()it is used to work out which fieldmap to use for the sf export, and notify the user if there are multiple fieldmaps that apply for the node type.I created the attached patch to address all of these, but haven't tested it yet, since I'm preserving the passwordExpired state of my SF developer accounts to test a fix for that. Please test and review this patch.
Also, the other issues you described but didn't fix are important. Feel free to submit a patch for those in a new issue node.
Also, please create patches from the root of the salesforce module, according to drupal patch standards. Otherwise your patches are good and clean! :)
#2
#3
I created #536292: Automatic syncing can not be changed after fieldmap-creation and #536298: Allow syncing on update and create which address the additional issues raised here.
#4
Here's the patch updated @ DRUPAL-6--2
This is a small enough patch it might as well get rolled into dev ASAP.
#5
#6
committed http://drupal.org/cvs?commit=330986
#7
Automatically closed -- issue fixed for 2 weeks with no activity.