You need to sign in to do that
Don't have an account?
sfdc@isha.ax1814
Lightning component creation- Urgent help
Hi Team,
Iam new to lightning. i hae a requirement that i have a existed vfpage and that need to be converted as a Lightning componnet.
My vfpage code below:
<apex:page standardController="Account" tabStyle="Account">
<apex:iframe src="" scrolling="true" height="650px" id="NPXAccountChartFrame" />
<!--if you embed mutiple chart add some index to id-->
<script>
var embeddedLink = '{!$Setup.SFDC_URL__c.NPX_Survey_Responses_Embed__c}';
var embedChartUrl = '/main/embed?'+embeddedLink;//this need to change as per chart/view embed link
var enterpriseIdfier = 'testttttt';//this need to change as per enterprise
console.log('Account.Id = {!Account.Id}');
var smxServer = '{!$Setup.SMX_URL__c.SMX_URL__c}';
var varSessionID = '{!$Api.Session_ID}';
var saleforceServer = '{!$Setup.SFDC_URL__c.SFDC_URL__c}';
var varOwner = '{!$User.Id}';
var varUsername = '{!$User.Username}';
embedChartUrl = embedChartUrl + '&urlParams={"INTEGRATION_COMPANY_REF_ID":"{!Account.Id}"}';
var url = smxServer + '/app/core/j_satmetrix_security_check?session='+ varSessionID + '&server="'+saleforceServer+'"&owner='+varOwner+'&username='+varUsername+'&version=3&enterpriseIdfier='+enterpriseIdfier+'&requestTokenType=SALES_FORCE&requestToken=NONE&targetUrl='+embedChartUrl;
document.getElementById('NPXAccountChartFrame').src = url;
<!--if you embed mutiple chart add some index to id-->
</script>
</apex:page>
Regards,
Isha
Iam new to lightning. i hae a requirement that i have a existed vfpage and that need to be converted as a Lightning componnet.
My vfpage code below:
<apex:page standardController="Account" tabStyle="Account">
<apex:iframe src="" scrolling="true" height="650px" id="NPXAccountChartFrame" />
<!--if you embed mutiple chart add some index to id-->
<script>
var embeddedLink = '{!$Setup.SFDC_URL__c.NPX_Survey_Responses_Embed__c}';
var embedChartUrl = '/main/embed?'+embeddedLink;//this need to change as per chart/view embed link
var enterpriseIdfier = 'testttttt';//this need to change as per enterprise
console.log('Account.Id = {!Account.Id}');
var smxServer = '{!$Setup.SMX_URL__c.SMX_URL__c}';
var varSessionID = '{!$Api.Session_ID}';
var saleforceServer = '{!$Setup.SFDC_URL__c.SFDC_URL__c}';
var varOwner = '{!$User.Id}';
var varUsername = '{!$User.Username}';
embedChartUrl = embedChartUrl + '&urlParams={"INTEGRATION_COMPANY_REF_ID":"{!Account.Id}"}';
var url = smxServer + '/app/core/j_satmetrix_security_check?session='+ varSessionID + '&server="'+saleforceServer+'"&owner='+varOwner+'&username='+varUsername+'&version=3&enterpriseIdfier='+enterpriseIdfier+'&requestTokenType=SALES_FORCE&requestToken=NONE&targetUrl='+embedChartUrl;
document.getElementById('NPXAccountChartFrame').src = url;
<!--if you embed mutiple chart add some index to id-->
</script>
</apex:page>
Regards,
Isha
You can make your vf page lightning compatible by adding the lightningStylesheets="true" at the apex:page level.
You can also use <apex:includeLightning /> for your javascript to work as expected. Refer the below link for further details
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_flows_lightningruntime.htm