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
Ty WhitfieldTy Whitfield 

Lightning Controller Question

Not sure why I'm having a problem with this.  I need a button (Lightning Controller) that will open two urls in separate tabs passing the CaseNumber parameter.  I can open the two URLs but can't seem to be able to pass the parameter.

WebExRedirect.cmp
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
    <aura:attribute type="Case" name="case"/>

    <ui:button label="WebEx2"    press="{!c.openActionWindow}"/>
</aura:component>
And my WebExRedirectController.js
({
	openActionWindow : function(component, event, helper) {
        if (confirm("Are you sure you want to Initiate a Webex support session for this case?")) 
{    
   var caseid ={!v.CaseNumber};


window.open("www.someURL?" + caseid + "&level=2");
window.open("www.someURL?" + caseid + "&level=2");
	}
    }
})

Please help

 
Anil SomasundaranAnil Somasundaran

@Ty Whitfield,

It is not possible to fetch the parameter in JS controller using {!v.CaseNumber}, instead of this, use the below one
​var caseid =component.get("v.CaseNumber");

Please mark this as best answer if your query has been resolved. Visit my blog to find more about lightning https://techevangel.com/author/anilsomasundaran/