Call Pop - Salesforce Setup

Modified on Tue, Jun 10 at 11:47 AM


1.) Log into Salesforce and open the Developer Console in the top right. 

2.) Select File -> New -> Lightning Application  

3.) Name the Lightning Bundle TeleVoIPsSearchApp and click Submit  
 



 Debug • Open Resource Test Workspace • CTRL+O CTRL+SHIFT+O Open Lightning Resources CTRL+SHIFT+A Open Log Open Raw Lcg Dovvnload Log Save Save All Delete Close Close All CTRL+SHIFT+G CTRL+ALT+G CTRL+S CTRL +SHIFT+S CTRL+DELETE CTRL+/ CTRL+ALT+/ Help < > Apex Class Apex Trigger Visualforce Page Visualforce Component Static Resource Lightning Application Lightning Component Lightning Interface Lightning Event Lightning Tokens  
Ck soon. Setup Setup ærvt -pp Service Setup $ Your Account Add pr±Æts Developer Console Edit Page New Lightning Bundle Name: Description: Application Configuration Create bundle with any of the following configurations (optional) C] Lightning Out Dependency App Submit  

4.) Click the Application panel on the right and paste the following: 

 

<aura:application> 

    <aura:attribute name="search" type="String" /> 

    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> 

    Redirecting to search results for {!v.search} 

</aura:application> 


Debug • Test • Workspace - Help • < TeleVoIPsSearchAppControIIer.js * eleVoIPsSea rchApp.a 1 v <aura:application> TeleVo I PsSea rchApp 2 3 4 5 <aura:attribute name="search" type="string" /> <aura:handler name="init" ! this}" action Redirecting to search results for {Iv.search} </aura : application> " dolnit} " / > {lc. Ctrl Shih * Ctrl Shift * 3 Ctrl Shift Ctrl Shift Ctrl Shift Ctrl Shift APPLICATION CONTROLLER HELPER STYLE c.ocuNENTAT10N RENDERER Bundle Version Settings Tests Chedpoints Il Query Editor State P rogress P robkms

5.) Click the Controller panel on the right and paste the following: 

 

({ 

doInit : function(component, event, helper) { 

        // Grab search query from URL 

        var searchQuery = component.get("v.search"); 

         

        // Convert search query into SF expected format 

        var stringToEncode = '{"componentDef":"forceSearch:search","attributes":{"term":"'+ searchQuery + '","scopeMap":{"type":"TOP_RESULTS"},"context":{"disableSpellCorrection":false,"SEARCH_ACTIVITY":{"term":"'+ searchQuery + '"}}}}'; 

        var encodedString = btoa(stringToEncode); 

         

        // Redirect user (this only works from Lightning App, won't work from components) 

        window.location = "/one/one.app?source=alohaHeader#" + encodedString; 

 

} 

}) 


6.) Click FILE -> Save All




Once completed, submit the your URL to the TeleVoIPs Integration team and we will provision your Chrome Extension as needed. it will be formatted like below: 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article