title: mule db2 sfdc account data loading
body: <p>My Java code is:</p>
  
  <pre><code>public class Db2sfdc {      
      public Map&lt;String, Object&gt; getPayloadData(@Payload String src){     
          HashMap&lt;String, Object&gt; sfdcFields = new HashMap&lt;String, Object&gt;();
          Map&lt;String, Object&gt; payloadMap = new HashMap&lt;String, Object&gt;();
          List&lt;Map&lt;String, Object&gt;&gt; objects = new ArrayList&lt;Map&lt;String,Object&gt;&gt;();
          sfdcFields.put("Client_Alert_Description__c", "Mule interation");
          sfdcFields.put("Client_Status_Reason__c","POC update");
          sfdcFields.put("Credit_Terms__c", "POC Terms");
          objects.add(sfdcFields);
          payloadMap.put("type", "Account");
          payloadMap.put("objects", objects);
          return payloadMap ;
      }
  </code></pre>
  
  <p>Mule flows:</p>
  
  <pre><code>&lt;flow name="db2accountFlow1" doc:name="db2accountFlow1"&gt;
      &lt;http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="db2account" doc:name="HTTP"/&gt;
      &lt;invoke name="sfdcmap" object-ref="db2sfdc" method="getPayloadData" methodArguments="#[message.payload]" methodArgumentTypes="java.lang.String" doc:name="Invoke"/&gt;
      &lt;sfdc:upsert config-ref="Salesforce__Basic_authentication" externalIdFieldName="Client Status" type="Account" doc:name="Salesforce"&gt;
          &lt;sfdc:objects ref="#[payload.objects]"/&gt;
      &lt;/sfdc:upsert&gt;        
  &lt;/flow&gt;
  </code></pre>
  
  <p>Error message at browser:</p>
  
  <pre><code> Failed to invoke upsert. Message payload is of type: HashMap
  </code></pre>
  
  <p>Console error:</p>
  
  <pre><code>ERROR 2015-05-11 18:58:38,090 [[sfdc].connector.http.mule.default.receiver.04] org.mule.retry.notifiers.ConnectNotifier: Failed to connect/reconnect: Work Descriptor. Root Exception was: null. Type: class com.sforce.soap.partner.fault.InvalidFieldFault
  ERROR 2015-05-11 18:58:38,094 [[sfdc].connector.http.mule.default.receiver.04] org.mule.exception.DefaultMessagingExceptionStrategy: 
  ********************************************************************************
  Message               : Failed to invoke upsert. Message payload is of type: HashMap
  Code                  : MULE_ERROR--2
  --------------------------------------------------------------------------------
  Exception stack is:
  1. null (com.sforce.soap.partner.fault.InvalidFieldFault)
    sun.reflect.NativeConstructorAccessorImpl:-2 (null)
  2. [InvalidFieldFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_FIELD'
   exceptionMessage='No such column 'Client_Alert_Description__c' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.'
  ]
   row='-1'
   column='-1'
  ]
  ]
   (java.lang.RuntimeException)
    org.mule.modules.salesforce.api.SalesforceExceptionHandlerAdapter:69 (null)
  3. Failed to invoke upsert. Message payload is of type: HashMap (org.mule.api.MessagingException)
    org.mule.devkit.processor.DevkitBasedMessageProcessor:128 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
  --------------------------------------------------------------------------------
  Root Exception stack trace:
  [InvalidFieldFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_FIELD'
   exceptionMessage='No such column 'Client_Alert_Description__c' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.'
  ]
   row='-1'
   column='-1'
  ]
  ]
  
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
  ********************************************************************************
  </code></pre>