function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jo pricejo price 

api synch issues

We are seeing this error when trying to sycnh transaction records from our web site to salesforce using API code the :

This is the full error message
Funraisin (Funraisin)
May 7, 2020, 6:20:03 PM GMT+10
<pre>Array
(
[0] => stdClass Object
(
[causeview__Expected_Amount__c] => 2.00
[Service_Fee__c] => 0.00
[causeview__Gift_Type__c] => One Time Gift
[causeview__Source__c] => Funraisin
[causeview__Receipt_Type__c] => Single Receipt
[Legacy_Receipt_Number__c] => DONSHW1142
[causeview__Status__c] => Payment Received
[causeview__Channel__c] => Web
[RecordTypeId] => 0122v000001ePxfAAE
[causeview__Affiliated_Contact__c] => 0032v00003V8JtXAAV
[causeview__Gift_Date__c] => 2020-05-07T00:00:00+10:00
[causeview__Constituent__c] => 0032v00003V8JtXAAV
)

)
</pre><pre>Array
(
[0] => stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[fields] => Array
(
[0] => RecordTypeId
)

[message] => Record Type ID: this ID value isn't valid for the user: 0122v000001ePxfAAE
[statusCode] => INVALID_CROSS_REFERENCE_KEY
)

)
[id] =>
[success] =>
)

)
</pre>d


this ID 0122v000001ePxfAAE represents an opp record type
David Zhu 🔥David Zhu 🔥
You may Check the user's profile if the right record type has been assigned on the object (seems called "stdClass")
SwethaSwetha (Salesforce Developers) 
HI Jo,
You need to pass the appropriate userID instead of RecordType at this line in your code.
[RecordTypeId] => 0122v000001ePxfAAE

Decode Prefixes: http://www.fishofprey.com/2011/09/obscure-salesforce-object-key-prefixes.html
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you