Question: please clarify the action field/column

Sid_M - June 22, 2009 - 20:14
Project:Salesforce
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I am unclear about the action field in the salesforce_field_map table. In the install file, this field is defined as follows: "The action this map is for (import vs export)."

For the reasons outlined below, I am wondering whether the action field is a remnant of an earlier architecture, is there because planned future development anticipates needing it, or is there just in case it is needed for some future development. I would appreciate it if somebody would clarify the thinking around this field. If this has already been discussed elsewhere online, I would appreciate a link.

Also, if somebody is actually using this field (in a patch?), I would appreciate hearing about that.

What follows are the things which make me wonder about this.

Looking through the code, I see a number of places where code varies based on the value of the action field. In every case, it defaults to export, only doing an import-related action if the field is explicitly set to "import". However, so far as I can tell, there is no way that this field can be set through the current UI. Nor have I found any where in existing code where this field is set.

The explanatory comment for the salesforce_api_fieldmap_options function indicates that the function includes an $action parameter, explaining that the parameter is used to, "Filter the fieldmaps by action." However, the $action parameter is not implemented by the actual function.

The salesforce_api_fieldmap_clone function does take an $action parameter. However, the only place which calls that function is salesforce_api_menu, and it does not pass in an argument for that parameter. (Perhaps that is just a bug which has not yet been found because this feature is not yet being used.)

#1

Bevan - July 31, 2009 - 08:28
Status:active» needs work

Sid, I'm not sure about that, but I removed the documentation of the missing paramter in http://drupal.org/cvs?commit=245248

I need to defer to Josh K for the answer to this though – I was wondering too!

 
 

Drupal is a registered trademark of Dries Buytaert.