• Steve Ross 39
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 2
    Questions
  • 4
    Replies
I would like to launch an email composer from a visualforce commandLink as shown below. Any ideas? Would rather not create this
from scratch unless I have to.

User-added image
Having an issue passing the record Id to a visualforce page with a controller exitension.

My URL is https://plumlending--lightning.lightning.force.com/lightning/n/Entity_View?=001m000000igKW8AAM

Controller:
public class entityViewControllerExtension {

    public Id recordId {get; set;}
    public Account acct {get;set;}
    
    // The extension constructor initializes the private member
    // variable acct by using the getRecord method from the standard
    // controller.
    public entityViewControllerExtension(ApexPages.StandardController stdController) {
        this.acct = (Account)stdController.getRecord();
        this.recordId = stdController.getId();
        system.debug('entityViewControllerExtension: acct.Id='+acct.Id);
        system.debug('entityViewControllerExtension: recordId='+recordId);      
    }
}
VF page:
<apex:page standardController="Account" extensions="entityViewControllerExtension" tabStyle="account">
    <apex:form >
        <apex:pageBlock>
            <apex:pageBlockSection columns="2">
                <apex:pageBlockSectionItem helpText="...">
                    <apex:outputLabel value="Entity View"/>
                    <apex:outputText> fields will go here </apex:outputText>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem labelStyle="display:none;" dataStyle="display:none;">
                    <apex:outputText >&nbsp;</apex:outputText>
                    <apex:outputText >&nbsp;</apex:outputText>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I see null values from my debug statements and can't understand why. This must be an issue with the URL format as it works in classic but not lightning. 

Any help is much appreciated!
 
Having an issue passing the record Id to a visualforce page with a controller exitension.

My URL is https://plumlending--lightning.lightning.force.com/lightning/n/Entity_View?=001m000000igKW8AAM

Controller:
public class entityViewControllerExtension {

    public Id recordId {get; set;}
    public Account acct {get;set;}
    
    // The extension constructor initializes the private member
    // variable acct by using the getRecord method from the standard
    // controller.
    public entityViewControllerExtension(ApexPages.StandardController stdController) {
        this.acct = (Account)stdController.getRecord();
        this.recordId = stdController.getId();
        system.debug('entityViewControllerExtension: acct.Id='+acct.Id);
        system.debug('entityViewControllerExtension: recordId='+recordId);      
    }
}
VF page:
<apex:page standardController="Account" extensions="entityViewControllerExtension" tabStyle="account">
    <apex:form >
        <apex:pageBlock>
            <apex:pageBlockSection columns="2">
                <apex:pageBlockSectionItem helpText="...">
                    <apex:outputLabel value="Entity View"/>
                    <apex:outputText> fields will go here </apex:outputText>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem labelStyle="display:none;" dataStyle="display:none;">
                    <apex:outputText >&nbsp;</apex:outputText>
                    <apex:outputText >&nbsp;</apex:outputText>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I see null values from my debug statements and can't understand why. This must be an issue with the URL format as it works in classic but not lightning. 

Any help is much appreciated!
 
Is it possible to open the lightning email composer from a lightning component similar to what we could do with the email author in classic?
For example: /email/author/emailauthor.jsp?p2_lkid={!Case.ContactId}&rtype=003&p3_lkid={!Case.Id}
I am using a lightning:datatable to display various fields, including a URL field which links to a printable PDF.

In the Spring 18 release, the URL field in the datatable now points to "javascript:void(0)" in the href attribute and the title attribute now contains the url which I am trying to set in the href field. 

Can someone please provide me a code example on how to get the href refrecne to work correctly?
Anybody else seeing issues with the developer console not opening in a developer org?

User-added image

I've tried multiple dev orgs and browsers. Any ideas?
I have a Email button in our Lightning component which I want to open a Lightning email publisher in a popup or similar when it's clicked - does anyone know if this is possible? I've hunted about and the only thing I could find which sounded like it might work was to use QuickActions, but when I've tried to use this, it just immediately sends the email - it doesn't create a user interface for the user to modify the values.

(The Apex code below is what I'm calling from our Lightning component - but if there's a way to embed an email publisher in the Lightning code that would do too)

@AuraEnabled
public static void serverEmail() {
QuickAction.QuickActionRequest req = new QuickAction.QuickActionRequest();
req.setQuickActionName('SendEmail');
OutgoingEmail email = new OutgoingEmail();
email.ToAddress = 'xxxx@yyyyy';
email.Subject = 'Does this work?';
req.record = email;
QuickAction.QuickActionResult res = QuickAction.performQuickAction(req);
}

 
  • August 10, 2018
  • Like
  • 1
Is it possible to open the lightning email composer from a lightning component similar to what we could do with the email author in classic?
For example: /email/author/emailauthor.jsp?p2_lkid={!Case.ContactId}&rtype=003&p3_lkid={!Case.Id}