• Michael Plunkett
  • NEWBIE
  • 25 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 8
    Replies
I am using ltng:require as specified in the docs to load multiple js libraries -- in the correct order of dependency. However, the scripts only load about 50% of the time. The other 50% the jsVectorMap scripts never load and the afterScriptsLoaded function never fires. Any thoughts??
 
<ltng:require styles="{!join(',','/resource/slds_2_1_3','/resource/jsVectorMapCSS')}"
                  scripts="{!join(',','/resource/jQuery','/resource/jsVectorMap','/resource/jsVectorMapUS')}" 
                  afterScriptsLoaded="{!c.setScriptLoaded}" />

 
I have a component that can have up to 50-100 of the same child components. I am firing an application event from the parent component that should be handled by the child components, but I've noticed it will only be handled by the first 12 child components every time. Is anyone aware of event handling limitations I might be running up against? Any ideas on how to get around this?
Is there a command where you can launch the New Note window programatically and pass in a Contact Id? I would like to utilize this function from a Lightning Component I've developed, but I can't find anything anywhere as far as an event that would trigger this in documentation. Anyone know if this is possible?
I am attempting to load notes via a legacy system -- I have created the template as suggested in the documentation here: https://help.salesforce.com/articleView?id=000230867&language=en_US&type=1. I have tried to upsert using Jitterbit and SF Data Loader with no success. Here is the error message I am getting from Jitterbit:
 
Fatal Error
Transformation failed.

Error(s) while processing C:\Users\MPlunkett\Desktop\SALESFORCE IMPORTS\Notes\notes-test.csv

Call to webservice at https://parkersearch.my.salesforce.com/services/Soap/u/37.0/00D41000000M61a failed. Reported error: The webservice call failed. The web service returned a SOAP Fault: 
Code: sf:UNKNOWN_EXCEPTION 
Message: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 2054325249-489880 (1110131948)  

Detail: <sf:UnexpectedErrorFault xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode><sf:exceptionMessage>An unexpected error occurred. Please include this ErrorId if you contact support: 2054325249-489880 (1110131948)</sf:exceptionMessage></sf:UnexpectedErrorFault>  

Additional details: Failed to call the web service at "https://parkersearch.my.salesforce.com/services/Soap/u/37.0/00D41000000M61a". Reason: The last (and probably most relevant) error was: The server returned HTTP Status Code : 500 Server Error  

Error is: The server encountered an unexpected condition that prevented it from fulfilling the request. Headers sent by the server: HTTP/1.1 500 Server Error Date: Tue, 21 Feb 2017 19:29:52 GMT Set-Cookie: BrowserId=YPCv95UDTLyCMzrZy-rTuA;Path=/;Domain=.salesforce.com;Expires=Sat, 22-Apr-2017 19:29:52 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/xml; charset=utf-8 Transfer-Encoding: chunked   

(The posted soap envelope was: 'C:/Windows/Temp/jitterbit_dl6/OpId_3567014_3dbcc36c-ada6-4811-a112-13cb11911a73/1_notes-test_t3520774_target.csv_req.xml'.) [CODE:10721] file: WebServiceHandler.cpp, line 1027 [CODE:10104] file: TreeMapperWebService.cpp, line 142 Failed to perform transformation using local source file: C:/Windows/Temp/jitterbit_dl6/OpId_3567014_3dbcc36c-ada6-4811-a112-13cb11911a73/1_notes-test.csv
My .csv file:
 
Title	Content
Note from Dashboard	C:\temp\notes\1-100348-1486163064.txt
File is valid and verified -- no invalid character

Any thoughts/suggestions?
Is this on the roadmap? Kind of annoying to switch back and forth to create portal users -- seems like a glaring omission from the lightning experience.
I am implementing lightning:tabset and lightning:tab to display tabs in a lightning component -- I am trying to conditionally display one particular tab based on a value returned by the controller -- but it is not rendering the tab. Does anyone have any insight into how to achieve this functionality? Also, when I try to set the selectedTabId in the init function, I get an error saying the tab does not exist.

Controller:
({
	doInit : function(component, event, helper) {
        var action = component.get("c.getSearchFromId");
        action.setParams({
            "recordId": component.get("v.recordId")
        });
        action.setCallback(this, function(response) {
            var state = response.getState();
            if(state === "SUCCESS"){
                if(response.getReturnValue().Candidates_Visible__c == true){
                    component.set('v.displayCandidates',true);
                } else {
                    component.set('v.displayCandidates',false);
                }
                component.set('v.search',response.getReturnValue());
            }
        });
        $A.enqueueAction(action);
	}
})
Component:
 
<aura:component controller="SecureSiteController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >

    <ltng:require styles="/resource/slds_2_1_3/assets/styles/salesforce-lightning-design-system-vf.css" />
    
    <aura:attribute name="recordId" type="String" access="global" />
    <aura:attribute name="search" type="Search__c" access="global" />
    <aura:attribute name="displayCandidates" type="Boolean" default="false" />

    <aura:handler name="init" value="{!this}" action="{!c.doInit}" access="global" />
    
    <!-- Display secure site tabs -->
    <lightning:tabset variant="default" selectedTabId="{!v.selTabId}">
		<aura:if isTrue="{!v.displayCandidates == true}">
            <lightning:tab aura:id="candidates" tabindex="1" id="candidates" title="Candidates" label="Candidates">
                <c:CandidateViewer recordId="{!v.recordId}" />
            </lightning:tab>
        </aura:if>
        <lightning:tab aura:id="searchmaterials" tabindex="2" id="searchmaterials" title="Search Materials" label="Search Materials">
            <c:SearchMaterials recordId="{!v.recordId}" />
        </lightning:tab>
        <lightning:tab aura:id="keydates" tabindex="3" id="keydates" title="Key Dates" label="Key Dates">
            <c:SearchKeyDates recordId="{!v.recordId}" />
        </lightning:tab>
        <lightning:tab aura:id="consultants" tabindex="4" id="consultants" title="Consultants" label="Consultants">
            <c:SearchConsultants recordId="{!v.recordId}" />
        </lightning:tab>
        <lightning:tab aura:id="securemessage" tabindex="5" id="securemessage" title="Send a Message" label="Send a Message">
            <c:SecureSiteMessage recordId="{!v.recordId}" />
        </lightning:tab>
    </lightning:tabset>
    
</aura:component>


 
Running into a strange issue -- I have developed several lightning components that are displayed in Lightning App Builder. I added a second one that has all the same "implements=" as the other ones, but for some reason is not showing as an option in App Builder. Given the fact that other components are showing up - any ideas/thoughts on things to check? Here is my aura:component line:
 
<aura:component controller="SecureSiteController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">

 
Here is my setup -- I am using Lightning experience and have a custom object as a related list and have overridden the New button to redirect to a custom visualforce page, where you can upload up to 10 files. Clicking Upload uploads them, relates them to the parent record, and inserts them via DML. Clicking Done redirects to the parent page via PageReference and the Parent ID. I have noticed that redirecting to the parent object, sometimes the new records are not displaying, and it takes a full page refresh for them to show up. Any ideas on what might be causing this?

User-added image
User-added image
This below code is working perfect with 10 mb but when I try to upload more than 10mb file then it throws an error.
private string TOKEN = 'access_token_of_dropbox_app';//
string folderPathWithFileName;
for(ContentVersion contentVersionRec : [SELECT PathOnClient, VersionData FROM contentversion
										   WHERE contentdocumentId IN : contentDocumentIdSet){
	folderPathWithFileName = '/Root/'+PathOnClient;//PathOnClient contains file name with extension like imagefile.png
	system.debug('###folderPathWithFileName=>'+folderPathWithFileName);
	Http http = new Http();
	HttpRequest httpReq = new HttpRequest();
	httpReq.setEndpoint('https://content.dropboxapi.com/2/files/upload');
	httpReq.setMethod('POST');
	httpReq.setHeader('Authorization','Bearer ' + TOKEN);
	httpReq.setHeader('Content-Type','application/octet-stream');
	httpReq.setHeader('Dropbox-API-Arg','{"path":"'+folderPath+'","mode":{".tag":"add"}}');
	httpReq.setBodyAsBlob(contentVersionRec.VersionData);
	HttpResponse httpResponse = http.send(httpReq);
	System.debug('res###' + httpResponse);
	System.debug('res.getBody()###'+httpResponse.getBody());
	if (httpResponse.getStatusCode() == 200) {
		System.debug('##Congratulations File Uploaded successfully :) =>'+httpResponse.getBody());
	}else{
		//Handle code here when file not uploaded. 
	}
}

The error is : System.CalloutException: Exceeded max size limit of 12000000 with request size 12001280

I know(limit while sending http request) reason of this error but there should be a way to send more than 10mb file. Actually I need to upload up to 100 mb file from http request(Salesoforce) to dropbox.

If anyone have any idea please help.
BoatReiews component's doInit is not getting invoked. I have attached the screenshot of the error which I get when the component is called after submiting a review.

User-added image

Below is the code for BoatReview.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global"   controller="BoatReviews">
    <aura:handler name="doInit" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="boat" type="Boat__c"/>
    <aura:attribute name="Id" type="Id" />
    <aura:attribute name="boatReviews" type="BoatReview__c[]" access="private"/>
    <ui:scrollerWrapper>
        <aura:if isTrue="{!v.boatReviews.length==0}">  
            <lightning:layoutItem class="slds-align_absolute-center" flexibility="auto" padding="around-small">   
                <ui:outputText value="No Reviews Available" />
            </lightning:layoutItem>
        </aura:if>
        <aura:if isTrue="{!v.boatReviews.length!=0}">
                    <div class="slds-feed">
            <ul class="slds-feed__list">
                <aura:iteration items="{!v.boatReviews}" var="boatReview">
                    <li class="slds-feed__item">
                        <div class="slds-media__body">
                       <div class="slds-grid slds-has-flexi-truncate">
                            <a href="javascript:void(0)" onclick="{!c.onUserInfoClick}"
          data-userid="{!boatReview.CreatedBy.Id}">
          {!boatReview.CreatedBy.Name}
      </a>
                        &nbsp; &mdash; &nbsp; {!boatReview.CreatedBy.CompanyName}
   </div>
                         <p><lightning:formattedDateTime value="{!boatReview.CreatedDate}" 
                                   year="numeric" month="short" day="numeric"  
                                   hour="2-digit" minute="2-digit" hour12="true"/></p>
                        </div>
                    </li>
                    <div class="slds-post__content slds-text-longform">
                        <p> {!boatReview.Name}</p>
                        <p>{!boatReview.Comment__c}</p>
                                </div>                           
                </aura:iteration>
            </ul>
        </div>
        </aura:if>
    </ui:scrollerWrapper>
</aura:component>

BoatReviewController.js
({
    doInit : function(component, event, helper) {
        //alert("BR controller init");
        component.set("v.Id",component.get("v.boat.Id"));
        console.log("BR controller init");
        helper.onInit(component,event,helper); 
    },
    onUserInfoClick : function(component, event, helper)
    {
        
    }
})
BoatReviewHelper.js
({
    onInit : function(component,event,helper)
    {
         console.log("BR helper init");

        var action =component.get("c.getAll");
        action.setParams(boatId, component.get("v.Id"));
               action.setCallback(this, function(response)
               {
                       var state = response.getState();
                    if(state="SUCCESS")
                       component.set("v.boatReview", response.getReturnValue());
               })
        $A.enqueueAction(action);
    }
})
I am using ltng:require as specified in the docs to load multiple js libraries -- in the correct order of dependency. However, the scripts only load about 50% of the time. The other 50% the jsVectorMap scripts never load and the afterScriptsLoaded function never fires. Any thoughts??
 
<ltng:require styles="{!join(',','/resource/slds_2_1_3','/resource/jsVectorMapCSS')}"
                  scripts="{!join(',','/resource/jQuery','/resource/jsVectorMap','/resource/jsVectorMapUS')}" 
                  afterScriptsLoaded="{!c.setScriptLoaded}" />

 
I am implementing lightning:tabset and lightning:tab to display tabs in a lightning component -- I am trying to conditionally display one particular tab based on a value returned by the controller -- but it is not rendering the tab. Does anyone have any insight into how to achieve this functionality? Also, when I try to set the selectedTabId in the init function, I get an error saying the tab does not exist.

Controller:
({
	doInit : function(component, event, helper) {
        var action = component.get("c.getSearchFromId");
        action.setParams({
            "recordId": component.get("v.recordId")
        });
        action.setCallback(this, function(response) {
            var state = response.getState();
            if(state === "SUCCESS"){
                if(response.getReturnValue().Candidates_Visible__c == true){
                    component.set('v.displayCandidates',true);
                } else {
                    component.set('v.displayCandidates',false);
                }
                component.set('v.search',response.getReturnValue());
            }
        });
        $A.enqueueAction(action);
	}
})
Component:
 
<aura:component controller="SecureSiteController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >

    <ltng:require styles="/resource/slds_2_1_3/assets/styles/salesforce-lightning-design-system-vf.css" />
    
    <aura:attribute name="recordId" type="String" access="global" />
    <aura:attribute name="search" type="Search__c" access="global" />
    <aura:attribute name="displayCandidates" type="Boolean" default="false" />

    <aura:handler name="init" value="{!this}" action="{!c.doInit}" access="global" />
    
    <!-- Display secure site tabs -->
    <lightning:tabset variant="default" selectedTabId="{!v.selTabId}">
		<aura:if isTrue="{!v.displayCandidates == true}">
            <lightning:tab aura:id="candidates" tabindex="1" id="candidates" title="Candidates" label="Candidates">
                <c:CandidateViewer recordId="{!v.recordId}" />
            </lightning:tab>
        </aura:if>
        <lightning:tab aura:id="searchmaterials" tabindex="2" id="searchmaterials" title="Search Materials" label="Search Materials">
            <c:SearchMaterials recordId="{!v.recordId}" />
        </lightning:tab>
        <lightning:tab aura:id="keydates" tabindex="3" id="keydates" title="Key Dates" label="Key Dates">
            <c:SearchKeyDates recordId="{!v.recordId}" />
        </lightning:tab>
        <lightning:tab aura:id="consultants" tabindex="4" id="consultants" title="Consultants" label="Consultants">
            <c:SearchConsultants recordId="{!v.recordId}" />
        </lightning:tab>
        <lightning:tab aura:id="securemessage" tabindex="5" id="securemessage" title="Send a Message" label="Send a Message">
            <c:SecureSiteMessage recordId="{!v.recordId}" />
        </lightning:tab>
    </lightning:tabset>
    
</aura:component>


 
Running into a strange issue -- I have developed several lightning components that are displayed in Lightning App Builder. I added a second one that has all the same "implements=" as the other ones, but for some reason is not showing as an option in App Builder. Given the fact that other components are showing up - any ideas/thoughts on things to check? Here is my aura:component line:
 
<aura:component controller="SecureSiteController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">

 
Today my Lightning sandbox is having some serious behavious issues. 
I run into following errors:
  • Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. An internal server error has occurred Error ID: 1986783592-9485 (1990134024)
  • Uncaught TypeError: Cannot read property 'b' of null throws at https://cs88.lightning.force.com/auraFW/javascript/ywi4clSWfDw6pOdt8rkxkQ/aura_prod.js:268:162
When I refresh the window, the error disappears and I can continue working untill the next one appears, and so on.

Anyone have any clue what is happening? 
Hi,
Is there a text area UI component available or any way to achieve it without using a raw textarea element?

Thanks