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 ![]() | ![]() ![]() |
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> | ![]() |
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
Feedback sent
We appreciate your effort and will try to fix the article