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
sfdc@isha.ax1814sfdc@isha.ax1814 

Through quick action need to display URL in lightning - Urgent req

Hello Eevryone,

If i click on the quickaction i need to display the below URL in case object.Can you help me how to do this.


http://compass/trainer/mycompass/patients?pageaction=search&mrn=\{!Account.Mrn__pc}


Regards,
Isha
Yogeshwar TailorYogeshwar Tailor
Hi Isha,

Can you please tell me how you want to show URL in (Field or in model window) ..??

Thanks,
Yogesh
sfdc@isha.ax1814sfdc@isha.ax1814
If i click on that URL the below vfpage will be opened
Yogeshwar TailorYogeshwar Tailor
Hi Isha,

Please tell me i am correct or not..

First i will click quick action -> then URL will come in the model window(Because actions are running in model window) -> when i will click on that url it will redirect to vf page.

If this is not correct let me know.

Thanks,
Yogesh
sfdc@isha.ax1814sfdc@isha.ax1814
first i will click on quick action--> then URL will come in the model window--> URL should be opened in the new window. -->Model window should close 
sfdc@isha.ax1814sfdc@isha.ax1814
Hi Yogesh,

I feel It can be done via Compoent. Can you help me with the code.


Regards,
Isha
Yogeshwar TailorYogeshwar Tailor
Hi Isha,

Sorry for late reply.

Lightning Component
<aura:component implements="flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride" access="global" >
	
    <a onclick="{!c.openUrl}">http://compass/trainer/mycompass/patients?pageaction=search</a>
</aura:component>

Controller Code
({
	openUrl : function(component, event, helper) {
        
		$A.get("e.force:closeQuickAction").fire();
        window.open('https://www.google.com');
	}
})

and create Quick action on case object and add it to page layout in Mobile and Lightning action.

this will fulfil your requirement => 

That quick action will open in model - > Url will be in the model window - > when you will click url -> Url will open in different window and model will close. 

If it will not help please let me know. 

Thanks,
Yogesh