lwc
lwc copied to clipboard
unable to import RecordType.DeveloperName from @salesforce/schema
Description
@Salesforce/Schema behaves inconsistently - it's possible to import standard and custom sObject's fields, e.g. Contact.Name, but if there's an import for RecordType.DeveloperName there's an error on the deployment attempt.
Steps to Reproduce
Create LWC component and include the following import in the controller:
import RECORD_TYPE_DEVELOPER_NAME from '@salesforce/schema/RecordType.DeveloperName';
Expected Results
successful import
Actual Results
Error:(1, 1) FIELD_INTEGRITY_EXCEPTION - Invalid reference RecordType.DeveloperName of type sobjectField in file example.js: Source
Browsers Affected
not applicable
Version
- latest
Facing the same issue, but importing CurrencyIsoCode from CustomSObject on multy-currency ORG.
Thanks for raising this issue @mateuszzw and @EugeneMarshin. Sorry for the delayed response. We are having some trouble reproducing the issue you are facing. Could you please share a minimal SFDX project or detailed steps to reproduce this issue in a fresh dev org?
We are getting the same issue Error:(1, 1) FIELD_INTEGRITY_EXCEPTION - Invalid reference CRS_WorkItem__c.RecordType.DeveloperName of type sobjectField in file wiDeferralAction.js: Source
CRS_WorkItem__c is a custom sObject.
@alz-gg Could you please share a minimal repro?