• Baddepally Ramlingappa
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,
The opportunity page has 2 lightning components.
1. Canvas app which holds third party application i.e Enterproize Quotes application (This is in a second tab of lightning tabset and first tab is for Stage/Path).
2. Quotes related list which is a custom related list that holds quotes created in third party application for the related opportunity.

The requirement is 
When header part of quote related list( Header is anchor tag i.e link button) is clicked, canvas app which is also present in the opportunity page has to load that particular quote in third party application.

Lightning component code is
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global">
	
    <aura:attribute name="recordId" type="Id"/>
    <aura:handler event="PassQuoteIdEvt" action="{!c.handleQuoteIdEvent}"/>
    <aura:attribute name="parameters" type="String" default="" />
    <aura:attribute name="selTabId" type="String" default="2"/>
   	<aura:attribute name="variant" type="String" default="linear"/>
    <aura:attribute name="hideUpdateButton" type="Boolean" default="false"/>
    
    
	<lightning:tabset selectedTabId="{!v.selTabId}" >
        <lightning:tab aura:id="StageTab" label="Stage" id="1">
            <lightning:path aura:id="path" recordId="{!v.recordId}"
                variant="{!v.variant}"
                hideUpdateButton="{!v.hideUpdateButton}"/>
        </lightning:tab>
        
    	<lightning:tab aura:id="EQQuoteTab" label="EQ Quote" id="2">
			<force:canvasApp developerName="TimsEQConnector" applicationName="TimsEQConnector" parameters="{!v.parameters}"     
            height="540px" width="100%" border="0" scrolling="no"/>
        </lightning:tab> 
	</lightning:tabset>

</aura:component>
On page load, canvas app shows list page of third party application which works fine. Now when I click on any Quote from related list, canvas app should take those details and load that particular quote. 

Here the code which gets called from link click of quotes related list. Here I have hard coded the quote Id.
handleQuoteIdEvent : function(component, event, helper) {        
     
        var eqQuoteId='EQ000001-1';        
        var parameters ="{ 'entity': 'Quote', 'id': '" + eqQuoteId + "' }";        
        component.set("v.parameters", parameters); 
        component.set("v.selTabId", '2');
        component.find('EQQuoteTab').focus()
	}

How to load canvas app with particular quote details. 

Thanks