I need to fetch all records from metadata. But I am facing error like below.
yc {status: 404, body: {…}, headers: {…}}
body:
errorCode: "NOT_FOUND"
message: "The requested resource does not exist"
statusCode: 404
__proto__: Object
headers: {}
status: 404
ok: (...)
statusText: (...)
__proto__: Object
Note: Unsure what should be the name of the listViewApiName. How to find the list view api name for a metadata?
import {getListUi} from 'lightning/uiListApi';
import taskMetadata_OBJECT from '@salesforce/schema/SR_Task_Library__mdt';
@wire(getListUi, {
objectApiName: taskMetadata_OBJECT,
listViewApiName: 'listOfAllTaskRecords'
})
wiredTaskLists ({error, data}) {
if (data) {
console.log(`getListUI ${data}`)
} else if (error) {
console.error(error)
}
}