AI代码解释 import{LightningElement,wire}from'lwc';importstartRequestfrom'@salesforce/apexContinuation/ContinuationDemoController.startRequest';exportdefaultclassContinuationComponentextendsLightningElement{// Using wire service@wire(startRequest)wiredContinuation;getformattedWireResult(){returnJSON.stringify(this.wired...
continuationCmp.js:写法上和访问apex class方法没有任何不同 import { LightningElement,wire } from 'lwc'; import startRequest from'@salesforce/apexContinuation/ContinuationDemoController.startRequest'; exportdefaultclass ContinuationComponent extends LightningElement {//Using wire service@wire(startRequest) w...
Now we have a good understanding of using wire mechanism in Lightning Web Component. Let’s talk about how to get salesforce data with imperative service. Here is example of LWC call Apex method with parameters imperatively. NOTE :- For Imperative method we dont need to mark the apex method...