• Andrew Aldis 15
  • NEWBIE
  • 80 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 40
    Questions
  • 14
    Replies
I will be getting laid off at the end of the year and am looking for some advice of credentialling.  I had a SF Developer 1 but let it lapse.  I am studying to retake the test in Sept.  After that I am going to start studying for either the platform developer 2 or work toward the application architect (probably will not get that completed before I have to start looking).  My question is which would be more attractive to potential employers?  Career wise I just want to continue being a developer and do not have any immediate goals of doing anything else.  
In your opinion what are the benefits of each credential, and keep in mind I will start looking in Oct or early Nov so I will definately be able to complete the Dev 2 by then but probably will not be able to get more that 2 or 3 of the necessary credentials for the application architect, although I do think I could commit to getting that complete by the end of the year.  

Any advice would be much appreciated.  Thanks in advance.
Hello we are overriding the standard event button with a custom lightning component, it works fine however when you create an event from the Calender on the home page by double clicking on a time slot it does not pass the Date/Time to the component.  Is there a way that I can get the Date/Time from the slot on the calendar when a user double clicks it?  i.e. if a user selects  the 12:00 pm slot on 8/1/19 how do I pass those values to the lightning component?
We are overriding the standard New Event button with a completely custom lightning component.  The new component implents the following  'lightning:actionOverride,force:hasRecordId,force:hasSObjectName,lightning:hasPageReference'.  It works fine except that when I double click on a time frame on the Calendar it does not carry over the time I click i.e. I double click the 12:00 pm slot, and the time defaults to 8:00 am.  How can I pass the time from the calendar to the new event lightning component?
I am trying to replace the New Event button on the SF calendar with a lightning component as well as the new task button on the Todays Tasks page with lightning components, I was able to do it with visual force pages, but we are planning to replace those with lightning components.  I changed to buttons to override the standard component with the lightning component but it does not seem to work.  Does anyone know how to do this?  Below is the button I over rode.
User-added image
 
Hello,

I am trying to use the xmlstreamwriter class in a lighting component and I keep getting an error "Non static method cannot be referenced from a static context", and i cannot figure out how to fix it.  My code is below, any help is appreciated.


@auraEnabled
public static String getOrderURL(string recordId) {
system.debug('get Order URL called Record Id is '+recordId);

system.debug('record Id is not Null');
Contact C;
C = [SELECT CreatedById, Id, FirstName, LastName, Account.ID, Account.Name,
MailingStreet, MailingCity, MailingStateCode, MailingPostalCode, MailingCountry,
Phone, Email
FROM Contact WHERE Id = :recordId];
system.debug('contact is '+C);
FGS_SSO__c sso = FGS_SSO__c.getInstance(); // Custom Settings data for URL, Company ID, etc.
system.debug('sso is '+sso);
XmlStreamWriter w = new XmlStreamWriter();
w.writeStartDocument('utf-8', '1.0');
w.writeStartElement(null, 'NewDataSet', null);
w.writeStartElement(null, 'Customer', null); // Customer
w.WriteElement(w, 'CustomerID', sso.CustomerID__c);
w.WriteElement(w, 'FirstName', UserInfo.getFirstName());
w.WriteElement(w, 'LastName', UserInfo.getLastName());
w.WriteElement(w, 'UserEmail', UserInfo.getUserEmail());
w.WriteElement(w, 'UserName', UserInfo.getFirstName() + ' ' + UserInfo.getLastName());
w.WriteElement(w, 'UserID', UserInfo.getUserName());
w.writeEndElement(); //end Customer
w.writeStartElement(null, 'Recipients', null); // Recipients
w.writeStartElement(null, 'Recipient', null); // Recipient
w.WriteElement(w, 'ShipFirstName', C.FirstName);
w.WriteElement(w, 'ShipLastName', C.LastName);
w.WriteElement(w, 'ShipCompany', C.Account.Name);
w.WriteElement(w, 'ShipAddress', C.MailingStreet);
w.WriteEmptyElement(null, 'ShipAddress2', null); // Required
w.WriteEmptyElement(null, 'ShipAddress3', null); // Required
w.WriteElement(w, 'ShipCity', C.MailingCity);
w.WriteElement(w, 'ShipStateProvince', C.MailingStateCode);
w.WriteElement(w, 'ShipZipPostal', C.MailingPostalCode);
w.WriteElement(w, 'ShipCountry', C.MailingCountry);
w.WriteElement(w, 'ShipPhone', C.Phone);
WriteElement(w, 'ShipEmail', C.Email);
w.WriteElement(w, 'CustomerID', C.Id); // Must be non-null
w.WriteElement(w, 'CreatedBy', UserInfo.getUserId()); // this is wrong - should be the UserInfo.getUserId()
w.WriteElement(w, 'AccountID', C.Account.Id);
w.WriteElement(w, 'ContactID', C.Id);
w.WriteEmptyElement(null, 'CampaignID', null); // Required
w.writeEndElement();
w.writeEndElement();
w.writeEndDocument();
String xmlOutput = 'inputXML=' + EncodingUtil.urlEncode(w.getXmlString(), 'UTF-8');
system.debug('xmlOutput is '+xmlOutput);
XmlStreamWriter.close();
// III. Post XML to FGS Web Service and return redirect URL.
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint(sso.URL__c);
req.setMethod('POST');
req.setHeader('Content-Length', String.valueOf(xmlOutput.length()));
req.setBody(xmlOutput);
HttpResponse res;
if (!isApexTest){
// Make a real callout since we are not running a test
res = h.send(req);
Dom.Document doc = res.getBodyDocument();
return doc.getRootElement().getText();
} else {
// A test is running
return '';
}
}

 
None of my lightning:formattedEmail components or any links to send emails are working all of a sudden.  The just open the pop-up below.  This is a brand new problem.  Has anyone else had this problem.  It seems specific to IOS Mobile.  Has anyone seen this or know what to do about it?User-added image
Hello,

I am trying to show and hide a div when a button is clicked. I am trying to pull back a div by the id and it always comes back as undefined.  I have console logged the variable of the id and it works.  Can anyone help me figure this out?


selectRow : function(component, event, helper) {
var device = component.get("v.device");
console.log('device is '+device);
var itemIndex = parseInt(event.target.dataset.value);
helper.selectRow(component, itemIndex);
if(device == 'PHONE'){
var rectarget = event.currentTarget;
console.log('rectarget is '+rectarget);
var accId = rectarget.getAttribute("id");
console.log('id is '+accId);
var div = 'div'+accId;
console.log('div is '+div);
var cmpTarget = component.find(div);
console.log('cmpTarget is '+cmpTarget);
if(cmpTarget == 'show'){
$A.util.addClass(cmpTarget, 'hide');
$A.util.removeClass(cmpTarget, 'show');
} else {
$A.util.addClass(cmpTarget, 'show');
$A.util.removeClass(cmpTarget, 'hide');
}
}
},

<div class="{!v.phoneClass}" id="{!'div'+index}">  
<lightning:tabset class="moveUp">
<lightning:tab>
<aura:set attribute="label">
<span>Available ({!v.availProductCount})</span>
</aura:set>
<div style="padding-right:12px;">
<lightning:spinner aura:id="spinner" alternativeText="Waiting for Product Availability data" />
<ui:scrollerWrapper class="scrollerSize">
<aura:iteration items="{!v.products}" var="product">
<div class="wrapVertical" title="{!product.productName}">
{!product.productName}
</div>
</aura:iteration>
</ui:scrollerWrapper>
</div>
</lightning:tab>
<lightning:tab>
<aura:set attribute="label">
<span>Unavailable ({!v.unavailProductCount})</span>
</aura:set>
<div style="padding-right:12px;">
<lightning:spinner aura:id="spinner" alternativeText="Waiting for Product Availability data" />
<ui:scrollerWrapper class="scrollerSize">
<aura:iteration items="{!v.unavailableProducts}" var="product">
<div class="slds-truncate" title="{!product.productName}">
{!product.productName}
</div>
</aura:iteration>
</ui:scrollerWrapper>
</div>
</lightning:tab>
</lightning:tabset>
</div>
We have a lighting component that we are using on a mobile page.  On the page I have a menu that opens when a icon is clicked, however it stays open until a option is choses or the icon is clicked again.  I need to close it whenever the user click anywhere else on the screen.  How can I accomplish that?

The menu code is below.

<div class="slds-col colPadding" id='menuButton'>
<div class="moreButton">
<div class="slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open">
<lightning:icon iconName="action:more" size="small" alternativeText="more" class="moreIcon" onclick="{!c.showHideMore}" />
<div class="slds-dropdown slds-dropdown_right" id="dropDown" style="{!v.showHide}">
<ul class="slds-dropdown__list" role="menu" aria-label="Show More">
<li class="slds-dropdown__item" role="presentation" style="width:160px" >
<a onclick="{!c.pageRedirect}" role="menuitem" tabindex="0" id="walletshare">
<span class="slds-truncate" title="Show Walletshare">Show Walletshare</span>
</a>
</li>
<li class="slds-dropdown__item" role="presentation" style="width:160px" >
<a onclick="{!c.pageRedirect}" role="menuitem" tabindex="-1" id="call">
<span class="slds-truncate" title="Log A Call">Log A Call</span>
</a>
</li>
<li class="slds-dropdown__item" role="presentation" style="width:160px" >
<a onclick="{!c.pageRedirect}" role="menuitem" tabindex="-1" id="event">
<span class="slds-truncate" title="Log A Meeting">New Event</span>
</a>
</li>
<li class="slds-dropdown__item" role="presentation" style="width:160px" >
<a onclick="{!c.pageRedirect}" role="menuitem" tabindex="-1" id="task">
<span class="slds-truncate" title="New Task">New Task</span>
</a>
</li>
<li class="slds-dropdown__item" role="presentation" style="width:160px" >
<a onclick="{!c.pageRedirect}" role="menuitem" tabindex="-1" id="advisor">
<span class="slds-truncate" title="Advisor Profile">Advisor Profile</span>
</a>
</li>
<li class="slds-dropdown__item" role="presentation" style="width:160px" >
<a onclick="{!c.pageRedirect}" role="menuitem" tabindex="-1" id="retirement">
<span class="slds-truncate" title="Retirement Profile">Retirement Profile</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
I am trying to create a HTML table in a lightning component to show a list of contacts related to a account.  I have the list but am trying to use lightning:formattedName and lightning:formattedphone components to display the name and phone nujmber however when I go to the page it shows functions rather than the correct information.  Please see my code and the image below.  Does anyone know why this is happening and what I can do to correct it?  ui:output fields work like with the email, but not the lightning formatted which  I have used several times before.

<aura:iteration items="{!v.contacts}" var="c">
<tr class="tableRow">
<td class="tableCol col1">
<lightning:formattedName aura:id="c.Id" firstName="{!c.FirstName}" lastName="{!c.LastName}" />
</td>
<td class="tableCol col2">
{!c.Title}
</td>
<td class="tableCol col3">
<ui:outputCheckbox value="{!c.RIA_Primary_Contact__c}" />
</td>
<td class="tableCol col4">
<p>
<lightning:formattedPhone value="{!c.Phone}"></lightning:formattedPhone>
</p>
</td>
<td class="tableCol col5">
<ui:outputEmail value="{!c.Email}" />
</td>
</tr>
</aura:iteration>


User-added image
I created a HTML table in a lighting component, that needs specific styling of the text within the defferent rows.  I also need to add onclick javascript to the row or cells that will call a method.  I am using aura:iteration and need to get a external Id associated with every  row, the external Id field is title comp_fund_code.  Every thing I try only results in a event.getSource() is not a function error message.  Does anyone know how I can accomplish this.  My cod eis below.

<table class="table">
<aura:iteration items="{!v.salesBreakdown}" var="sb">
<tr class="row" onclick="{!c.openModal}" aura:id="{!sb.comp_fund_code}" name="{!sb.comp_fund_code}">
<td class="fund" aura:id="{!sb.comp_fund_code}" name="{!sb.comp_fund_code}">
{!sb.fund_name}
</td>
<td class="sales" aura:id="{!sb.comp_fund_code}" name="{!sb.comp_fund_code}">
<lightning:formattedNumber value="{!sb.sales}" style="currency" currencyCode="USD" />
</td>
</tr>
</aura:iteration>
</table>
openModal: function (component, event, helper) {
console.log('open modal')
var fundCode = event.getSource().getLocalId();
component.set('v.fundCode',fundCode);
component.set('v.showFundDetails', true);
},
 
We created a custom lightning component (NOT A LIGHTNING RECORD PAGE) to override the standard contact page in Mobile.  Does anyone know if it is possible to only allow certain users by profile or permission set to have that page overridden for them?  We would like to conduct a pilot prior to releasing the page.
Does anyone know how to make a slds-page-header on a custom lightning component static, and it needs to work in Mobile not just desktop.
We have a custom lightning  component that we plan to use with Mobile.  We were hoping to replace the phone number, email, and address with icons that would still open maintain the ability to call open emails and open the map just like the text version can.  Is there a way to pull that off?
Is there a way to create a lightning component with a static header and footer that stay at the top even when the user is scrolling.  I need it to work in mobile more that desktop.  If not are there any work arounds?
We are doing some mobile development and are wanting to do a pilot before we role all the changes out to the rest of the company.  Our understanding is that all profiles see the same Mobile version and we cannot roll a mobile app out without rolling it out to all profiles.  Is that true does anyone happen to have some advice on how we could achieve a pilot and only role our changes out to a small group of users?
I am creating a lightning component and am having trouble with the order that the Java script runs.  I have some <canvas></canvas> in a lightning tab.  when the tabs are changed it calls some javascript which cannot find the canvas on the first time I select a tab.  After I select the tab and go back to it it works fine.  I am using charts.js as well, but I do not think that is the issue.  How can make sure that the canvas component renders prior to the javascript running?  My code is below.

Lightning CMP:
<lightning:tabset class="tabs" variant="scoped" onselect="{! c.tabSelect }">
<lightning:tab label="RETAIL" id='retail'>
<div class="asOfGraph" >as of {!v.asOfGraph}</div>
<div class="graph" >
<canvas aura:id="barChart" id="barChart" class="barChart" />
</div>
</lightning:tab>
<lightning:tab label="DCIO" id="dcio">
<div class="asOfGraph">as of {!v.asOfGraph}</div>
<div class="graph" id="dcioGraph" >
<canvas aura:id="dcioChart" id="dcioChart" class="dcioChart" />
</div>
</lightning:tab>
<lightning:tab label="RECORDKEEPER" id='recordkeeper'>
<div class="asOfGraph">as of {!v.asOfGraph}</div>
<div class="graph" id="recordKeeperGraph">
<canvas aura:id="recordChart" id="recordChart" class="recordChart"/>
</div>
</lightning:tab>
<lightning:tab label="ASSETS" id='assets'>
<div class="asOfGraph">as of {!v.asOfGraph}</div>
<div class="graph" id="assetsGraph">
<canvas aura:id="assetsChart" id="assetsChart" class="assetsChart"/>
</div>
</lightning:tab>
</lightning:tabset>

JS
tabSelect: function (cmp, evt, help) {
var tab = evt.getParam("id");
console.log('tab is ' + tab);
if (tab == 'assets') {
help.createVerticalGraph(cmp, evt);
//cmp.set("v.assetsSet", true);
} else if (tab == 'dcio') {
help.createBarGraph(cmp, evt);
// cmp.set("v.dcioSet", true);
} else if (tab == 'recordkeeper') {
help.createBarGraph(cmp, evt);
// cmp.set("v.recordkeeperSet", true);
}
},
I am calling a method when a new tab is selected.  The method finds a canvas html element on the component but the method seems to be getting called before the HTML element is loaded.  Is there a way to delay calling the method until the canvas element is loaded?
We are working on a mobile project and just ran into a very strange behavior that we cannot figure out how to stop.  We have embedded Visualforce pages into our standard contact pagelayout the pages have some interactive features, primarily tabs and a button , however in mobile when ever anyone touches the VF page it automatically redirects the user off of the contact page to the visual forcepage itself.  Is this normal or did we do something wrong?
I am trying to retrieve a lightning component from another component.   however when I try it comes back as undefined.  I have used this code in other components and it works but I  cannot see why it is not working with this one.  Am I overlooking something?


code:
viewAllActivities: function(component, event, helper) {
    console.log('modalEvent 1 clicked');
    var modalEvent = $A.get("e.c:ModalEvent");
    console.log('modalEvent 1 ' + modalEvent);
    modalEvent.setParams({
      "modalName": "c:retailDashboard_SellRed_Modal",
      "modalAction": "open",
      "modalData": {
        "parentId": ""
      }
    });
    console.log('modalEvent 2 ' + modalEvent);
    modalEvent.fire();
  },

Modal
<aura:event type="APPLICATION" description="Event to control modals within the OFI_ModalManager">
    <aura:attribute name="modalName" type="String" description="Name of the Modal to be affected."/>
    <aura:attribute name="modalAction" type="String" description="Action to be performed: Open, Close."/>
    <aura:attribute name="modalData" type="Object" description="An object containing data to be passed to the Modal."/>
</aura:event>
We have a Lightning:badge component in the label of a lightning:tab that was rendering correctly until we activated winter 19 release in our sandbox, now it is not longer rendering correctly.  Does anyone know why or know a solution?

          <lightning:tab id="{!tab.tabName}">
            <aura:set attribute="label">
              <span>{!tab.tabName}<lightning:badge label="{!tab.categoryNodes.length}"/></span>
            </aura:set>
I have a wrapper class that is being called by a sfdc lightning component.  For some reason I am not able to access all the values of the class once it is passed.  They are seem to be set in the controller but the lightning controller does not access all of them.  Does anyone know what I am doing wrong.  My code is below.  I did remove some code for brevity.

Controller
@auraEnabled
         public static List<activityWrapper> getAllActivities() {
                     Id usrId = UserInfo.getUserId();
                     List<activityWrapper> allAct = new List<activityWrapper>();
                     dateTime startDate = system.now().addDays(-180);
                         dateTime endDate = system.now().addDays(180);
           List<Id> eventRelationIds = new List<Id>();
                     List<Id> contactIds = new List<Id>();
                      List<Id> accountIds = new List<Id>();
             List<eventRelation> evtRel = [select eventId, relationId, AccountId from eventRelation where event.Owner.id = :usrId and isInvitee = false and event.StartDateTime >= :startDate AND event.StartDateTime <= :endDate order by event.StartDateTime asc ];
             for(eventRelation ev: evtRel) {
               eventRelationIds.add(ev.eventId);
                             contactIds.add(ev.relationId);
                             accountIds.add(ev.AccountId);
             }
           List<Event> eventList = [SELECT Id, Activity_Type__c,recordType.name, whoId, EventWhoIds,  Subject, Short_Description__c, StartDateTime, Description, Activity_Status__c, Owner.Name,  Financial_Account__c, ActivityRelation__c, endDateTime, activityDate FROM event  WHERE Owner.id = :usrId and StartDateTime >= :startDate AND StartDateTime <= :endDate  order by startDateTime asc];
                     List<Contact> contList =[Select Id, Email, MailingCity, MailingStreet, MailingState, MailingCountry, MailingPostalCode, Phone, Account.Name, Name, AccountId from Contact where Id in :contactIds];
                     List<Contact> accContacts = [Select Id, Name, Phone, Email from Contact where AccountId in :accountIds];
                     for(event e: eventList){
                         for(contact c: contList){
                             if(e.whoId == c.Id){
                                string contName = c.Name;
                                  string accName = c.Account.Name;
                               string actStatus = e.Activity_Status__c;
                                  Id accId = c.AccountId;
                              string sub = e.Subject;
                                 string actType = e.Activity_Type__c;
                              Id contId = c.Id;
                                 string descr = e.Description;
                              string phone = c.Phone;
                                 string email = c.Email;
                               date actDate = e.ActivityDate;
                              datetime stDate = e.StartDateTime;
                                datetime eDate = e.EndDateTime;
                                id  eId = e.Id;
                                string actStreet = c.MailingStreet;
                                string  actCity = c.MailingCity;
                                string  actState = c.MailingState;
                                string  actZip = c.MailingPostalCode;
                                string  actCountry = c.MailingCountry;
                                string  actMultiPerson = '';
                                 if(e.EventWhoIds.size() > 1){
                                     actMultiPerson = ' +';
                             }
                                  allAct.add(new activityWrapper(contName, accName, actStatus, accId, sub, actType, contId, descr, phone, email,  actDate, stDate, eDate, eId, actStreet, actCity, actState, actZip, actCountry, actMultiPerson));
                             }
                         }
                     }
                     return allAct;
         }

                 public class activityWrapper{
                    @AuraEnabled public string actContact {get; set;}
                    @AuraEnabled public string actAcc {get; set;}
                    @AuraEnabled public string actStatus {get; set;}
                    @AuraEnabled public id actAccId {get; set;}
                    @AuraEnabled public string actSubject {get; set;}
                    @AuraEnabled public string actType {get; set;}
                    @AuraEnabled public id actContId {get; set;}
                    @AuraEnabled public string actDesc {get; set;}
                    @AuraEnabled public string actPhone {get; set;}
                    @AuraEnabled public string actEmail {get; set;}
                    @AuraEnabled public date actDate {get; set;}
                    @AuraEnabled public dateTime actStDate {get; set;}
                    @AuraEnabled public dateTime actEndDate {get; set;}
          @AuraEnabled public Id actId {get; set;}
                    @AuraEnabled public string actStreet {get; set;}
                    @AuraEnabled public string actCity {get; set;}
                    @AuraEnabled public string actState {get; set;}
                    @AuraEnabled public string actzip {get; set;}
                    @AuraEnabled public string actCountry {get; set;}
                    @AuraEnabled public string actMultiPerson {get; set;}
              public activityWrapper( string contName, string accName, string actStatus, Id accId, string sub, string actType, Id contId, string descr, string phone, string email,  date actDate, datetime stDate,datetime eDate,id  eId,string actStreet,string  actCity,string  actState, string  actZip,string  actCountry,string  actMultiPerson){
                                actContact = contName;
                                actAcc = accName;
                                actStatus =  actStatus;
                                system.debug('*** actStatus2 is '+actStatus);
                                actAccId = accId;
                                actSubject =  sub;
                                actType = actType;
                                actContId = contId;
                                actDesc = descr;
                                actPhone = phone;
                                actEmail = email;
                                actDate = actDate;
                                actStDate = stDate;
                                actEndDate = eDate;
                                actId = eId;
                                actStreet = actStreet;
                                actCity = actCity;
                                actState = actState;
                                actZip = actZip;
                                actCountry = actCountry;
                                actMultiPerson = actMultiPerson;
              }
          }

  init: function(component, event, helper) {

    var allEvents = [];

    var action = component.get('c.getAllActivities');

 
    action.setCallback(this, function(response) {
      var state = response.getState();
      if (state === "SUCCESS") {
        component.set('v.AllActivities', response.getReturnValue());

        allEvents = response.getReturnValue();


      }

    });
    $A.enqueueAction(action);
  },
 
Is there a way to stop the drop down that give and option to wrap or clip text in a lightning data table?

User-added image
I am trying to create a HTML table in a lightning component to show a list of contacts related to a account.  I have the list but am trying to use lightning:formattedName and lightning:formattedphone components to display the name and phone nujmber however when I go to the page it shows functions rather than the correct information.  Please see my code and the image below.  Does anyone know why this is happening and what I can do to correct it?  ui:output fields work like with the email, but not the lightning formatted which  I have used several times before.

<aura:iteration items="{!v.contacts}" var="c">
<tr class="tableRow">
<td class="tableCol col1">
<lightning:formattedName aura:id="c.Id" firstName="{!c.FirstName}" lastName="{!c.LastName}" />
</td>
<td class="tableCol col2">
{!c.Title}
</td>
<td class="tableCol col3">
<ui:outputCheckbox value="{!c.RIA_Primary_Contact__c}" />
</td>
<td class="tableCol col4">
<p>
<lightning:formattedPhone value="{!c.Phone}"></lightning:formattedPhone>
</p>
</td>
<td class="tableCol col5">
<ui:outputEmail value="{!c.Email}" />
</td>
</tr>
</aura:iteration>


User-added image
I created a HTML table in a lighting component, that needs specific styling of the text within the defferent rows.  I also need to add onclick javascript to the row or cells that will call a method.  I am using aura:iteration and need to get a external Id associated with every  row, the external Id field is title comp_fund_code.  Every thing I try only results in a event.getSource() is not a function error message.  Does anyone know how I can accomplish this.  My cod eis below.

<table class="table">
<aura:iteration items="{!v.salesBreakdown}" var="sb">
<tr class="row" onclick="{!c.openModal}" aura:id="{!sb.comp_fund_code}" name="{!sb.comp_fund_code}">
<td class="fund" aura:id="{!sb.comp_fund_code}" name="{!sb.comp_fund_code}">
{!sb.fund_name}
</td>
<td class="sales" aura:id="{!sb.comp_fund_code}" name="{!sb.comp_fund_code}">
<lightning:formattedNumber value="{!sb.sales}" style="currency" currencyCode="USD" />
</td>
</tr>
</aura:iteration>
</table>
openModal: function (component, event, helper) {
console.log('open modal')
var fundCode = event.getSource().getLocalId();
component.set('v.fundCode',fundCode);
component.set('v.showFundDetails', true);
},
 
We have a custom lightning  component that we plan to use with Mobile.  We were hoping to replace the phone number, email, and address with icons that would still open maintain the ability to call open emails and open the map just like the text version can.  Is there a way to pull that off?
I am creating a lightning component and am having trouble with the order that the Java script runs.  I have some <canvas></canvas> in a lightning tab.  when the tabs are changed it calls some javascript which cannot find the canvas on the first time I select a tab.  After I select the tab and go back to it it works fine.  I am using charts.js as well, but I do not think that is the issue.  How can make sure that the canvas component renders prior to the javascript running?  My code is below.

Lightning CMP:
<lightning:tabset class="tabs" variant="scoped" onselect="{! c.tabSelect }">
<lightning:tab label="RETAIL" id='retail'>
<div class="asOfGraph" >as of {!v.asOfGraph}</div>
<div class="graph" >
<canvas aura:id="barChart" id="barChart" class="barChart" />
</div>
</lightning:tab>
<lightning:tab label="DCIO" id="dcio">
<div class="asOfGraph">as of {!v.asOfGraph}</div>
<div class="graph" id="dcioGraph" >
<canvas aura:id="dcioChart" id="dcioChart" class="dcioChart" />
</div>
</lightning:tab>
<lightning:tab label="RECORDKEEPER" id='recordkeeper'>
<div class="asOfGraph">as of {!v.asOfGraph}</div>
<div class="graph" id="recordKeeperGraph">
<canvas aura:id="recordChart" id="recordChart" class="recordChart"/>
</div>
</lightning:tab>
<lightning:tab label="ASSETS" id='assets'>
<div class="asOfGraph">as of {!v.asOfGraph}</div>
<div class="graph" id="assetsGraph">
<canvas aura:id="assetsChart" id="assetsChart" class="assetsChart"/>
</div>
</lightning:tab>
</lightning:tabset>

JS
tabSelect: function (cmp, evt, help) {
var tab = evt.getParam("id");
console.log('tab is ' + tab);
if (tab == 'assets') {
help.createVerticalGraph(cmp, evt);
//cmp.set("v.assetsSet", true);
} else if (tab == 'dcio') {
help.createBarGraph(cmp, evt);
// cmp.set("v.dcioSet", true);
} else if (tab == 'recordkeeper') {
help.createBarGraph(cmp, evt);
// cmp.set("v.recordkeeperSet", true);
}
},
I am trying to retrieve a lightning component from another component.   however when I try it comes back as undefined.  I have used this code in other components and it works but I  cannot see why it is not working with this one.  Am I overlooking something?


code:
viewAllActivities: function(component, event, helper) {
    console.log('modalEvent 1 clicked');
    var modalEvent = $A.get("e.c:ModalEvent");
    console.log('modalEvent 1 ' + modalEvent);
    modalEvent.setParams({
      "modalName": "c:retailDashboard_SellRed_Modal",
      "modalAction": "open",
      "modalData": {
        "parentId": ""
      }
    });
    console.log('modalEvent 2 ' + modalEvent);
    modalEvent.fire();
  },

Modal
<aura:event type="APPLICATION" description="Event to control modals within the OFI_ModalManager">
    <aura:attribute name="modalName" type="String" description="Name of the Modal to be affected."/>
    <aura:attribute name="modalAction" type="String" description="Action to be performed: Open, Close."/>
    <aura:attribute name="modalData" type="Object" description="An object containing data to be passed to the Modal."/>
</aura:event>
I am trying to get the value from a HTML select element in a Lighting Component, I need to user select because I am unable to correctly style a lighting:select component.  I need to get the value of the component when it is changed, but cannot seem to get it the sameway I would if it was a lightning component.  Any help is appreciated. 
Lighting Component
    <div aura:id="header" class="header">
        <div class='titleInput'>
            REGION:
            <select name="select" label="" aura:id='select' class="select" onchange="{!c.changeRegion}">
                <aura:iteration items="{!v.regions}" var="regions">
                    <option text="{!regions}"></option>
                </aura:iteration>
            </select>
            - SALES AND REDEMPTIONS
        </div>

Component.Js
  changeRegion: function(component, event, helper) {
    console.log('onchange called 1 ');
    var inputRegion = component.find('select').get('v.value');
    console.log(inputRegion);
    //helper.getRegionalSalesRedemptions(component);
  },
Hi All,

I am looking for a way to limit some components to their specific environment, I have 3 components that are almost identical but perform the same basic tab, I have a mobile component that I only want available in mobiel and do not want the user to see it in Lightning Experience, a VF Tab that I only want the user to see in Classic and a Lightning Tab that I only want the user to see in lightning.  Is there a way to accomplish this?
Hello,

I am  using a datatable component in a sfdc lighting component, when I veiw the component in Salesforce Classic it loads and looks fine, however in lighting experience the jquery components do not load.  A copy of my cod eis below

Component
<aura:component controller="ActivityFirmComponentControllerSCRewrite" implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId">
  <ltng:require styles="{! $Resource.    datatable + '/DataTables-1.10.16/media/css/jquery.dataTables.min.css'}"
                    scripts="{!join(',',
                             $Resource.jquery224 ,
                             $Resource.datatable + '/DataTables-1.10.16/media/js/jquery.dataTables.min.js')
                             }" afterScriptsLoaded="{!c.scriptsLoaded}"/>
    <aura:attribute name="modalData" type="String" access="GLOBAL" description="The page data"/>
    <aura:attribute name="parentId" type="String" description="The Firm Id to be passed to the query." />
    <aura:attribute name="urlEvent" type="String"/>
    <aura:attribute name="urlTask" type="String"/>
    <aura:attribute name="urlCall" type="String"/>
    <aura:attribute name="urlEdit" type="String"/>
    <aura:attribute name="Spinner" type="boolean" default="false"/>
    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    <aura:attribute name="AllActivities" type="List"/>
    <aura:handler event="aura:waiting" action="{!c.waiting}"/>
    <aura:handler event="aura:doneWaiting" action="{!c.doneWaiting}"/>
    <c:OFI_Modal class="slds-fade-in-open slds-modal--large" header="All Activities">
        <aura:if isTrue="{!v.Spinner}">
            <div aura:id="spinnerId" class="slds-spinner_container">
                <div class="slds-spinner--brand  slds-spinner slds-spinner--large slds-is-relative" role="alert">
                    <span class="slds-assistive-text">Loading</span>
                    <div class="slds-spinner__dot-a"></div>
                    <div class="slds-spinner__dot-b"></div>
                </div>
            </div>
        </aura:if>
        <center>
        <lightning:buttonGroup >
            <lightning:button  class='topBtn' label="New Event" onclick="{!c.goToUrl}"></lightning:button>
            <lightning:button  class='topBtn' label="New Task" onclick="{!c.goToUrl}"></lightning:button>
            <lightning:button  class='topBtn' label="Log a Call" onclick="{!c.goToUrl}"></lightning:button>
        </lightning:buttonGroup>
      </center>
        <div class="slds-m-around_large"  style="overflow: auto; overflow-y: hidden;">
          <table id="tableId" class="slds-table slds-table_bordered slds-table_cell-buffer" cellspacing="0" width="100%" >
              <thead>
                  <tr >
                      <th style="color:#005fb2" >Due Date</th>
                      <th style="color:#005fb2">Primary Contact</th>
                      <th style="color:#005fb2">Activity Type</th>
                      <th style="color:#005fb2">Subtype</th>
                      <th style="color:#005fb2">Subject</th>
                      <th style="color:#005fb2" class=".slds-has-flexi-truncate">Description</th>
                      <th style="color:#005fb2">Assigned To</th>
                      <th style="width:5%;color:#005fb2">View</th>
                  </tr>
              </thead>
              <tbody>
                <aura:iteration  items="{!v.AllActivities}" var="a">
                  <tr style="background-color:white; " class="dataRow">
                      <td>{!a.actDueDate}</td>
                      <td>{!a.actPrimaryContact}</td>
                      <td>{!a.actType}</td>
                      <td>{!a.actSubType}</td>
                      <td>{!a.actSubject}</td>
                      <td>{!a.actFullDesc}</td>
                      <td>{!a.actAssigned}</td>
                      <td class='view'><lightning:button class='rowBtn' variant="base" label="View" title="{!a.actId}" onclick="{! c.goToRecord }"/></td>

                  </tr>
                </aura:iteration >
              </tbody>
            </table>
        </div>
        <aura:set attribute="footer">
            <lightning:button label="Close" onclick="{!c.closeModal}"></lightning:button>
        </aura:set>
    </c:OFI_Modal>
    <div aura:id="backdrop" class="slds-backdrop slds-backdrop--open"></div>
</aura:component>

Component.js

({
  scriptsLoaded: function(component, event, helper) {
    console.log('Script loaded..');
  },

  init: function(component, event, helper) {
    var modalData = component.get("v.modalData");
    var parentId = component.get("v.modalData.parentId");
    //call apex class method

    var action = component.get('c.getAllActivities');
    action.setParams({
      "parentId": component.get("v.modalData.parentId"),
      "modalData": component.get("v.modalData")
    });
    action.setCallback(this, function(response) {
      //store state of response
      var state = response.getState();
        console.log('state is '+state);
      if (state === "SUCCESS") {
          console.log('state is success');
        //set response value in lstOpp attribute on component.
        component.set('v.AllActivities', response.getReturnValue());
        
        // when response successfully return from server then apply jQuery dataTable after 500 milisecond
        setTimeout(function() {
            console.log('timeout function set');
          var table = $('#tableId').DataTable();
                        console.log('table is '+table);
          // add lightning class to search filter field with some bottom margin..
          $('div.dataTables_filter input').addClass('slds-input');
            console.log('add class');
          $('div.dataTables_filter input').css("marginBottom", "10px");
                        console.log('add css');

        var order = table.order();
            table
            .order( [ 0, 'desc' ] )
            .draw();
             console.log('order');
            
        }, 500);
                console.log('500ml');
          
      }
    });
    component.set("v.parentId", parentId);
    console.log('check point 2');

    var urlEvent = "/setup/ui/recordtypeselect.jsp?ent=Event&retURL=%2Fa07J000000F0rlH&save_new_url=%2F00U%2Fe%3Fwhat_id=" + parentId + "&retURL" + parentId;
    var urlTask = "/setup/ui/recordtypeselect.jsp?ent=Task&status=Completed&retURL=/a07J000000F0rlH&save_new_url=%2F00T%2Fe%3Ftitle%3DCall%26what_id=" + parentId + "&followup=0%26tsk5%3DCall%26retURL" + parentId;
    var urlCall = "/setup/ui/recordtypeselect.jsp?ent=Task&tsk12=Completed&Task&tsk5=Call&Task&retURl=%2Fapex%2FredirectToNewTask?rId=" + parentId + "&save_new_url=%2F00T%2Fe%3Ftitle%3DCall%26retURL%3D%252F%2Fapex%2FredirectToNewTask?rId=" + parentId + "&retURl=%2Fapex%2FredirectToNewTask?rId=" + parentId + "&what_id=" + parentId;
    component.set("v.urlEvent", urlEvent);
    component.set("v.urlTask", urlTask);
    component.set("v.urlCall", urlCall);
    console.log('check point 3');
    $A.enqueueAction(action);
  },
Is there a way to stop the drop down that give and option to wrap or clip text in a lightning data table?

User-added image