• Diederik Verstraete
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies

We have build a lightning component that we placed on a Wordpress website via Lighting out ($Lightning.use).
This component is called AF_App (and AF_Main).

Now, we want to include a Live Agent standard component snippet on the same page from Service Cloud.
When we place both snippets on the same place we get following error:

Uncaught (in promise) Error: $Lightning.use() already invoked with application: c:AF_App

You can find everything back on this page:
https://kmo.attentia.be/blank-page-talent-peaks/
in the middle my component ( a screen flow build in apex/aura) and floating you see the "Chat with an expert" button

Use developer console to see the error.

How can I add the small User Profile Picture when I referrence the OwnerID via 

<lightning:outputField fieldName="OwnerId" />

Currently, I only get the Name. I want it to be like on any other page: the photo + name. 

OwnerID without profile pic
I want it like this:
owner name with picture

My current code is:
 

<aura:component implements="force:hasRecordId,forceCommunity:availableForAllPageTypes">
  <aura:attribute name="recordId" type="Id"/>

<lightning:layout>
<lightning:layoutItem size="6" padding="around-small">
 <lightning:recordViewForm recordId="{!v.recordId}" objectApiName="cxsrec___cxsPosition__c">
 
<lightning:outputField fieldName="OwnerId" />
 
</lightning:recordViewForm>            
</lightning:layoutItem>
</lightning:layout>
</aura:component>
This component is used inside an accordeon Section:
<lightning:accordion>
            <lightning:accordionSection label="Label1">
                <aura:set attribute="body">
                    <my component>
                </aura:set>
            </lightning:accordionSection>                    
</lightning:accordion>

 

Hi,

I use outputField in my component but the layout keeps behaving very weird. This component is used inside an accordeon. 

my columns are shifting
<lightning:recordViewForm recordId="{!v.recordId}" objectApiName="cxsrec___cxsJob_application__c">
           
            <lightning:layout >
                <lightning:layoutItem flexibility="auto" padding="around-small"  >                    
                    <lightning:outputField fieldName="ja_V_Card__c" />
                    <lightning:outputField fieldName="Current_employer__c" />
                    <lightning:outputField fieldName="Aktuelles_Gehalt__c" />
                    <lightning:outputField fieldName="cxsrec__Email_address__c" />
                </lightning:layoutItem>
                <lightning:layoutItem flexibility="auto" padding="around-small" >
                    <lightning:outputField fieldName="OwnerId" />
                    <lightning:outputField fieldName="cxsrec__Status__c" />
                    <lightning:outputField fieldName="dfind_Kandidatenstatus__c" />
                    <lightning:outputField fieldName="dfind_Highlighten_f_r_Kunde__c"  />
                </lightning:layoutItem>
            </lightning:layout>
            
        </lightning:recordViewForm>

Also, I have a second question. How do I show the user profile pic/icon next to the Owner ID (e.g. Talent Peaks) in the screenshot? 
 

Hi, 

I have a basic use case. I need to execute code based on a field value on my record. I have on my Quote object a field "Quote_language__c" with picklist values French and Dutch. 

So normally to send a signrequest, I have a detail page button that executes the signrequest page (send_signrequest). 

What I think is that I need 2 visualforce pages, one for Dutch and one for French. How do I make an "IF-clause" to read the quote language, and execute the correct visualforce page/code based on the field value? 

I have two visualforce pages (send_signrequestFR and send_signrequest) that are actually the same, but the body of the emailmessage is in French and in Dutch. 

I was thinking about Flow to assess criteria, but you can not call a visualforce page from Flow. 

Or can I implement an IF clause in my visualforce code? Something like:

<visualforce page>

<if (Quote_language__c == french)>
   <visualforce page code>

<if (Quote_language__c == dutch)>
   <visualforce page code>

</visualforce page>

How can I add the small User Profile Picture when I referrence the OwnerID via 

<lightning:outputField fieldName="OwnerId" />

Currently, I only get the Name. I want it to be like on any other page: the photo + name. 

OwnerID without profile pic
I want it like this:
owner name with picture

My current code is:
 

<aura:component implements="force:hasRecordId,forceCommunity:availableForAllPageTypes">
  <aura:attribute name="recordId" type="Id"/>

<lightning:layout>
<lightning:layoutItem size="6" padding="around-small">
 <lightning:recordViewForm recordId="{!v.recordId}" objectApiName="cxsrec___cxsPosition__c">
 
<lightning:outputField fieldName="OwnerId" />
 
</lightning:recordViewForm>            
</lightning:layoutItem>
</lightning:layout>
</aura:component>
This component is used inside an accordeon Section:
<lightning:accordion>
            <lightning:accordionSection label="Label1">
                <aura:set attribute="body">
                    <my component>
                </aura:set>
            </lightning:accordionSection>                    
</lightning:accordion>