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
Manoj Kumar 813Manoj Kumar 813 

Can any one help I am tyring to call apex method from wire service it is not accesible

import { LightningElement,wire,track,api } from 'lwc';
import getAccountDetails from '@salesforce/apex/accountDemo.getAccountDetails';

export default class Assignment1 extends LightningElement {
     @track accountResult;
        @wire(getAccountDetails) accounts;
            
}

1.Authorised org in place.
2.Sractch org in place
3.Dev Hub in place.
4.LWC local server in place.
5.Salesforce extension pack instal and updated.

Error can anyone help me to resole it

{"error":[{"message":"error parsing apex response: */{\"message\":\"apex://accountDemo: No apex action available for accountDemo.getAccountDetails\"}/*ERROR*/"}]}
ANUTEJANUTEJ (Salesforce Developers) 
Hi Manoj,

Have you anotated it as @Auraenabled?

Regards,
Anutej
Manoj Kumar 813Manoj Kumar 813
Yes
Auraenabled and cachable =true is also there;
ANUTEJANUTEJ (Salesforce Developers) 
Can you try checking this link: https://salesforce.stackexchange.com/questions/270754/unable-to-access-apex-in-namespaced-scratch-org