I am trying to generate url to open visualforce page embedded in a LWC using iFrame but I am getting undefined while using Navigationmixin.GenerateUrl to get the url. Can anyone suggest the correct way here?
myLwc.html
<template>
<iframe src={myFullUrl} style="width: 100%; height: 200px; border:0"></iframe>
</template>
myLwc.js
import { LightningElement, api, track, wire} from 'lwc';
import {OmniscriptBaseMixin} from 'vlocity_ins/omniscriptBaseMixin';
import { NavigationMixin } from 'lightning/navigation';
export default class MyLwc extends OmniscriptBaseMixin(NavigationMixin(LightningElement)) {
@api
get idvar () {
return this._idvar;
}
set idvar(value) {
this._idvar = value;
}
@track idvar;
@track fullUrl
@track interactionId;
myFullUrl;
urlWithParameters;
// Omniscript LWC properties
_idvar
_fullUrl
connectedCallback(){
this[NavigationMixin.GenerateUrl]({
type: "standard__webPage",
attributes: {
url: "/apex/InteractionActivity?Id=a266C000000GJ3SQAW"
}
}).then(url => {
this.myFullUrl = url;
console.log("FULL URL1 : " + this.myFullUrl);
}).catch(error => {
console.log(error);
});
console.log("FULL URL2 : " + this.myFullUrl);
}
}
UPDATED SCREENSHOT: