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
Marc GirodMarc Girod 

I'm trying to create incidents (IR) in Perl. I set a RecordTypeId to 'Incident', $sforce->upsert(type => 'ADM_Work__c', key => '', $wi); yields error: statusCode of 'INVALID_CROSS_REFERENCE_KEY'.

I'm using as template code that works for Investigations.
$wi is a hash populated for this context.
Where should I look for the cause of the error?
Is it type => 'ADM_Work__c'? What are the other options?
 
MagulanDuraipandianMagulanDuraipandian
The issue is that the user you are running the integration under is setting a record type that they don't have access. Check the integration profile and assign the record type access.

--
Magulan Duraipandian
www.infallibletechie.com
Marc GirodMarc Girod
Thanks, but no, it wasn't an access issue.
Solved by switching to: type => 'Case'