LWC RecordTypeInfos via getObjectInfo Unable to access
After trying to replicate your issue (which I was able to), it turned out that your issue is on this import line:
import { getRecord, getFieldValue, getObjectInfo } from 'lightning/uiRecordApi';
You have the wrong adapter here lightning/uiRecordApi
for getObjectInfo
resulting in all the issue where objectInfo
never gets populated thus returning that error.
To fix this, getObjectInfo
needs to be imported from lightning/uiObjectInfoApi
as below:
import { getObjectInfo } from 'lightning/uiObjectInfoApi';
I used the example in this documentation as a reference while trying to identify the resolution.