AnsweredAssumed Answered

INVALID_FIELD

Question asked by sreenivasulu.gidda.contractor619345 on May 7, 2018
Latest reply on May 8, 2018 by sreenivasulu.gidda.contractor619345

Team,

 

I'm performing Insert/Update operation to Pricebook Entry object at Salesforce. And at first execution, I processed the below record and it is successful. 

 

<?xml version='1.0' encoding='UTF-8'?>
<PricebookEntry>
<Pricebook2Id>7005</Pricebook2Id>
<Product2Id>3955271</Product2Id>
<CurrencyIsoCode>USD</CurrencyIsoCode>
<UnitPrice>150</UnitPrice>
<ERP_Item_ID__c>3955271</ERP_Item_ID__c>
<ERP_Start_Date_Active__c>2006-04-20</ERP_Start_Date_Active__c>
<ERP_LIST_HEADER_ID__c>7005</ERP_LIST_HEADER_ID__c>
<ERP_LIST_LINE_ID__c>6276390</ERP_LIST_LINE_ID__c>
<ERP_OPERAND__c>150</ERP_OPERAND__c>
<PBE_Concatenate__c>7005-USD-3955271</PBE_Concatenate__c>
</PricebookEntry>

 

At the second execution, I processed the below record and it is failed. 

 

<?xml version='1.0' encoding='UTF-8'?>
<PricebookEntry>
<Pricebook2Id>7006</Pricebook2Id>
<Product2Id>3955272</Product2Id>
<CurrencyIsoCode>USD</CurrencyIsoCode>
<UnitPrice>150</UnitPrice>
<ERP_Item_ID__c>3955272</ERP_Item_ID__c>
<ERP_Start_Date_Active__c>2006-04-20</ERP_Start_Date_Active__c>
<ERP_LIST_HEADER_ID__c>7006</ERP_LIST_HEADER_ID__c>
<ERP_LIST_LINE_ID__c>6276390</ERP_LIST_LINE_ID__c>
<ERP_OPERAND__c>150</ERP_OPERAND__c>
<PBE_Concatenate__c>7006-USD-3955272</PBE_Concatenate__c>
</PricebookEntry>

 

The error message is as below:

<PricebookEntry><id/><success>false</success><errors><error><statusCode>INVALID_FIELD</statusCode><message>OBJ: PricebookEntry - Foreign key external ID: 7006 not found for field ERP_List_Header_ID__c in entity Pricebook2</message></error></errors></PricebookEntry>

 

Any idea?

 

Thank you,

Sreeni

Outcomes