+ Start a Discussion
SushupsiSushupsi 

BATCH UPLOAD USING DATA LOADER ERROR: :INVALID_FIELD_FOR_INSERT_UPDATE

Hi All,

 

:smileysad::smileysad:

 

I have been trying to upsert using the dataloader batch mode. But i am facing few issues doing the same. Any help is appreciated.

 

Please find below the bean for upserting the Opportunity object. During upsert i need to use identifier other than the salesforce generated id (15 digit unique identifier). I have created an autonumber field which is being used as the unique reference key

I marked it as 'External Identifier' while creating the fields . My field is 'Salesforce_Opportunity_ID__c'.

 

Please find below my bean and mapping file and error details for suggesting appropriate solution.

 

    <bean id="OpportunityUpdate"
              class="com.salesforce.dataloader.process.ProcessRunner"
              singleton="false">
            <description>The Opportunity Object is updated using the Savvion generated '.csv' file.</description>
            <property name="name" value="OpportunityUpdate"/>
            <property name="configOverrideMap">
            <map>
		    <entry key="sfdc.debugMessages" value="false"/>
		    <entry key="sfdc.debugMessagesFile" value="E:\DebugLogs"/>
		    <entry key="sfdc.endpoint" value="https://test.salesforce.com"/>
		    <entry key="sfdc.username" value="mylogin@login.com"/>
		    <!-- password below has been encrypted using key file, therefore it will not work without the key setting: process.encryptionKeyFile
		    the password is not a valid encrypted value, please generate the real value using encrypt.bat utility -->
		    <entry key="sfdc.password" value="my encrypted password"/>
		    <entry key="process.encryptionKeyFile" value="E:\key.txt"/>
		    <entry key="sfdc.timeoutSecs" value="600"/>
		    <entry key="sfdc.loadBatchSize" value="200"/>
		    <entry key="sfdc.entity" value="Opportunity"/>
		    <entry key="process.operation" value="upsert"/>
		    <entry key="sfdc.externalIdField" value="Salesforce_Opportunity_ID__c"/>
		    <entry key="process.mappingFile" value="E:\updateMap.sdl"/>
		    <entry key="dataAccess.type" value="csvRead"/>
		    <entry key="process.statusOutputDirectory" value="E:\Log Files\"/>
		    <entry key="process.outputSuccess" value="E:\Success Files\Process_success.csv"/>
		    <entry key="process.outputError" value="E:\Failure Files\Process_failure.csv"/>
		    <entry key="sfdc.proxyHost" value="10.136.64.195" />
		    <entry key="sfdc.proxyPort" value="80" />
		    <entry key="sfdc.proxyUsername" value="s@.sfdc.com" />
		    <entry key="sfdc.proxyPassword" value="" />
		    <entry key="dataAccess.name" value="E:\Opp_Update.csv"/>
            </map>
            </property>
    </bean>

 My mapping file is as follows :

 

SALESFORCE_OPPORTUNITY_ID__C=Salesforce_Opportunity_ID__c

 

But i am facing the following error while i run the bean from command prompt.

39562 [OpportunityUpdate] ERROR com.salesforce.dataloader.client.Partne
rClient  - Error code is:INVALID_FIELD_FOR_INSERT_UPDATE
39562 [OpportunityUpdate] ERROR com.salesforce.dataloader.client.Partne
rClient  - Error message:Unable to create/update fields: Salesforce_Opportunity_
ID__c. Please check the security settings of this field and verify that it is re
ad/write for your profile.

 Since i am in the admin profile i donot understand wat else can be done, already the external id field is readonly visible to all (since it is autonumber readonly by default).When i tried the same in other org of mine it didn't throw any error and worked well at the very first instance. I am unable to contemplate the error and am struggling :smileysad:

 

Please respond ASAP , im in need of urgent help :(

The forums have been great help always hope to find solution again :) :D

 

TIA

- Sushupsi

Ispita_NavatarIspita_Navatar

There may be an issue with the visibility of the field Salesforce_Opportunity_ID__c for the admin user too check if it is "hidden". Please check thoroughly if admin profile has visibility read + write for this field that is it should be visible and should neither be read only or hidden for the other profiles. Check it by clicking the "Field Accessibility" button on the field detail page in "Setup". Make it Read/Write then your problem will be sorted.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

richwintlerichwintle

I just came across the same issue. Opportunity fields were meant to be copied in a trigger, but they were always null. I did a comparison between my sandbox (where data load worked) and production (which didn't) and found that the Field Level Security was set to not visible in prod on the admin profile. I changed the setting, BUT it still did not work!

 

I then found another custom profile 'Data Loader' that someone had created. It also had the wrong Field Level Security on the fields in question. I corrected them and data load now worked. What I find puzzling is that I was using a user login with an admin profile on the data loader, NOT the 'Data Loaderr' profile. Very strange - a bug perhaps?