You need to sign in to do that
Don't have an account?
vb13
Can not Create a Task Using Upsert: Unable to create/update fields: AccountId. Error
I need to create a task and link it to an Account based on the account external id.
I use the example from the manual - upsert() call, the section on upset and foreign keys.
I generate the following XML request:
<Subject>User vb16Save and Send Password</Subject><Description>User vb16 sent password and welcome email by tremor_sa</Description><ActivityDate>2008-11-19+15:58</ActivityDate><Status>Completed</Status><Publisher__c>PD00013</Publisher__c><Account><type>Account</type><Publisher_NUM__c>PD00013</Publisher_NUM__c></Account>
where Publisher__c is the Task externalid and Publisher_NUM__cis the account external id
Wraped in SOAP it becomes:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:SessionHeader><ns1:sessionId>511500D80000000LY4g!ARYAQG_TG0xCEstjK2Kou1cnpI3.HAUkxEwZOGtaQ6a2hBngygs0_SPOu0cvZMwvlmgTiihBuX9mJKFgc8z4pejdC0m9oRCR</ns1:sessionId></ns1:SessionHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:upsert><ns1:externalIDFieldName>Publisher__c</ns1:externalIDFieldName><ns1:sObjects>
<ns2:type>Task</ns2:type><ns2:Id xsi:nil="true"/><Subject>User vb16Save and Send Password</Subject><Description>User vb16 sent password and welcome email by tremor_sa</Description><ActivityDate>2008-11-19+15:58</ActivityDate><Status>Completed</Status><Publisher__c>PD00013</Publisher__c><Account><Publisher_NUM__c>PD00013</Publisher_NUM__c></Account></ns1:sObjects></ns1:upsert></SOAP-ENV:Body></SOAP-ENV:Envelope>
However I get a SF error:
Unable to create/update fields: AccountId. Please check the security settings of this field and verify that it is read/write for your profile.
Can someone help?
Again, this is specifically for a task.
I use the example from the manual - upsert() call, the section on upset and foreign keys.
I generate the following XML request:
<Subject>User vb16Save and Send Password</Subject><Description>User vb16 sent password and welcome email by tremor_sa</Description><ActivityDate>2008-11-19+15:58</ActivityDate><Status>Completed</Status><Publisher__c>PD00013</Publisher__c><Account><type>Account</type><Publisher_NUM__c>PD00013</Publisher_NUM__c></Account>
where Publisher__c is the Task externalid and Publisher_NUM__cis the account external id
Wraped in SOAP it becomes:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:SessionHeader><ns1:sessionId>511500D80000000LY4g!ARYAQG_TG0xCEstjK2Kou1cnpI3.HAUkxEwZOGtaQ6a2hBngygs0_SPOu0cvZMwvlmgTiihBuX9mJKFgc8z4pejdC0m9oRCR</ns1:sessionId></ns1:SessionHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:upsert><ns1:externalIDFieldName>Publisher__c</ns1:externalIDFieldName><ns1:sObjects>
<ns2:type>Task</ns2:type><ns2:Id xsi:nil="true"/><Subject>User vb16Save and Send Password</Subject><Description>User vb16 sent password and welcome email by tremor_sa</Description><ActivityDate>2008-11-19+15:58</ActivityDate><Status>Completed</Status><Publisher__c>PD00013</Publisher__c><Account><Publisher_NUM__c>PD00013</Publisher_NUM__c></Account></ns1:sObjects></ns1:upsert></SOAP-ENV:Body></SOAP-ENV:Envelope>
However I get a SF error:
Unable to create/update fields: AccountId. Please check the security settings of this field and verify that it is read/write for your profile.
Can someone help?
Again, this is specifically for a task.
But I am not setting neither the AccountId nor the WhatId field. I am using an external id on the Account as in the xml excerpt:
Account><type>Account</type><Publisher_NUM__c>PD00013</Publisher_NUM__c></Account>
Publisher_NUM__c is an external id field on the Account
If use WhatId, it requires me to pass an AccountId. But I want to pass the account external id. Am I missing something?
I am trying to do the same thing but I am still getting an error. Can you show me what worked for you?