import { LightningElement, api , track, wire } from 'lwc';
|
import { CurrentPageReference } from "lightning/navigation";
|
import { CloseActionScreenEvent } from 'lightning/actions';
|
import init from '@salesforce/apex/LexRepairQuoteController.init';
|
|
|
export default class lexProductRepairQuoteProduct extends LightningElement {
|
|
@api recordId;
|
IsLoading;
|
|
@wire(CurrentPageReference)
|
getStateParameters(currentPageReference) {
|
if (currentPageReference) {
|
const urlValue = currentPageReference.state.recordId;
|
console.log(currentPageReference);
|
if (urlValue) {
|
let str = `${urlValue}`;
|
console.log(str);
|
this.recordId = str;
|
|
}
|
}
|
}
|
|
|
connectedCallback(){
|
this.productRepairQuoteProduct().then(res=>{
|
this.IsLoading=false;
|
this.dispatchEvent(new CloseActionScreenEvent());
|
});
|
|
}
|
|
|
|
async productRepairQuoteProduct(){
|
|
window.open ('/apex/ProductRepairQuote?productid=' + this.recordId +
|
'&flag=productsearch', '', 'height=500, width=1200, top=300, left=350,location=no');
|
|
}
|
|
|
|
|
}
|