• Ryan Frank
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 10
    Replies
Does anyone know if it's possible to pass a blob in an LWC into the standard file uploader?  

We have a file that we are editing on the client side, but need to save down to the database and running into the 6MB heap size limit in apex.  We don't want asyncronous, and so we are trying to think outside of the box of other solutions.

We have also thought about a REST API call from the client side LWC, which would get us to 35MB size limit - but that exposes a token on the client side, which we don't want to do either.  

Which is why we were hoping to just have the blob on the client side and pass it to the standard file uploader so that it could do it's magic and have the limits up to 2GB.  

Any thoughts or suggestions?

Thanks!
The case path used to auto-update when a process, flow, trigger, or apex woud update the related path field.  But the case path is no longer auto-updating unless the user refreshes their screen.  

It says that it has been fixed here: https://success.salesforce.com/issues_view?id=a1p3A000000ewocQAA&title=sales-path-not-updated-if-record-type

and here: https://success.salesforce.com/issues_view?id=a1p3A0000001CqpQAE&title=sales-path-not-refreshing-with-process-builder-or-workflow-rules

And it used to work, but now it doesn't for some reason.  Any ideas?  Thanks in advance!

Ryan
I'm getting the following error when I try to load a flow (all flows and all flow versions are affected):
Load failure
Can't load flow.   Reference ID: 713997223-126777 (-1418778933).

I have standard support, so Salesforce support doesn't want to help.  

I have looked here:
https://salesforce.stackexchange.com/questions/130463/visual-flow-load-failure-cant-load-invocable-actions?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

And I have validated that there are no installed packages that are expired. 

Additionally, this article shows how to use the flow debugger tool: https://help.salesforce.com/articleView?id=Debug-and-view-more-error-details-while-working-in-Visual-Flow&language=en_US&type=1

However, when I dismiss the error message, the flow closes.  So I can never reach the ctrl+shift+m functionality.  

Any help would be greatly appreciated.

Ryan
I am trying to open the cloud flow designer on a particular flow, and I'm getting an error.  When I run the debug log tool (ctrl + shift + m), and select the "Errors" toggle.  I am presented with the following:  TypeError:  Error #1009.

Can anyone translate that into English for me?

Thanks in advance - 

Ryan
I have a lightning:datatable correctly showing records from my class, and I have a row level action for each of the rows - all functioning correctly if there is more than a single result in the query.  If there is only a single record from the query, then the row level action box is not displayed in an action-able window.  A scroll bar appears - but the action cannot be accessed.  Any thoughts?

Screenshot of the action with multiple rows:
User-added image

Screenshot with 2 rows:
User-added image

Screenshot with a single row:
User-added image

Thanks in advance!
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_lightning_openFiles.htm 

As I was creating a new lightning component with the lightning:openFiles functionality, I realized the documentation online is incorrect. the function is defined as "cmp", but within function itself it references "component".

I tried submitting a case, but apparently I need Premiere Support for anybody to fix this.  Can someone submit this to get fixed.

Thanks,
I have a component utilizing the Lightning Data Services to display data from the contact object.  I can get most fields to display properly, except for standard fields that have been renamed. As you can see below, the Title, and Email field will not display.

Here is my component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens,force:lightningQuickAction" access="global" >
	<aura:attribute name="record" type="Contact"/>
    <aura:attribute name="simpleRecord" type="Contact"/>
    <aura:attribute name="recordError" type="String"/>
    <aura:attribute name="recordID" type="String" />
    
    <force:recordData aura:id="recordLoader"
      recordId="{!v.recordID}"
      layoutType="FULL"
      targetRecord="{!v.record}"
      targetFields="{!v.simpleRecord}"
      targetError="{!v.recordError}"
      
      />
    

    <table class="slds-table slds-table_col-bordered slds-no-row-hover">
        
        <tbody>
            <tr>
            	<td width="20%">
                    <b>
                    Name
                    </b>
                </td>
                
                <td width="80%">
                    {!v.simpleRecord.Name}
                </td>
            </tr>
            <tr>
            	<td>
                    <b>
                    Title
                    </b>
                </td>
                
                <td>
                    {!v.simpleRecord.Primary_Business_Title__c }
                    {!v.simpleRecord.Title }
                </td>
            </tr>
            
            <tr>
            	<td>
                    <b>
                    Email
                    </b>
                </td>
                
                <td>
                    {!v.simpleRecord.Primary_Business_Email__c}
                    {!v.simpleRecord.Email}
                </td>
            </tr>
            
        
        
        
        
        
        </tbody> 
   
        </table>
    
    
    
    
    
</aura:component>

Here is the component's result:
User-added image

Here is the Contact Object Fields and Relationships Detail:

User-added image

The renamed field menu:

User-added image

Thanks in advance for any/all help received!
Hi All - 

I've followed these posts:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/components_using_flow_inputs_set.htm
and
https://developer.salesforce.com/forums/?id=9060G000000MV43QAG

But for some reason I can't get the following variable to show up within my flow that is embedded within the lightning component.  Code is pasted below - any help is much appreciated:
 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens, force:lightningQuickAction" access="global" >
	
    <Aura:handler name="init" value="{!this}" action="{!c.beginFlow}"/>
    <aura:attribute name="accountID" type="Id" default="001W000000eUrAFIA0"/>
    <aura:attribute name="accountName" type="String" />
    <aura:attribute name="numberOfEmployees" type="Decimal" />
    
    
    
    <lightning:flow aura:id="businessInformation" >
                
                </lightning:flow>
    
</aura:component>
 
({
	beginFlow : function(component,event,hlpr) {
           var flow = component.find("businessInformation");
           
    	   
           var inputVariables = [
            {
                name : "sVarID",
                type : "SObject",
                value : {
                    "Id" : component.get("v.accountId") 
                    
                }
                //value : component.get("v.recordId")
            },
               { name : "varTest", type : "String", value: [ "2016-10-27", "2017-08-01" ] }
               
        ];
          
           flow.startFlow("deleteMe");     
           }

    
    
    
    
    
    
    
    
    
    
})
I then have a simple screen on the flow to display the variables:

User-added image
 
I'm getting the following error when I try to load a flow (all flows and all flow versions are affected):
Load failure
Can't load flow.   Reference ID: 713997223-126777 (-1418778933).

I have standard support, so Salesforce support doesn't want to help.  

I have looked here:
https://salesforce.stackexchange.com/questions/130463/visual-flow-load-failure-cant-load-invocable-actions?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

And I have validated that there are no installed packages that are expired. 

Additionally, this article shows how to use the flow debugger tool: https://help.salesforce.com/articleView?id=Debug-and-view-more-error-details-while-working-in-Visual-Flow&language=en_US&type=1

However, when I dismiss the error message, the flow closes.  So I can never reach the ctrl+shift+m functionality.  

Any help would be greatly appreciated.

Ryan
I am trying to open the cloud flow designer on a particular flow, and I'm getting an error.  When I run the debug log tool (ctrl + shift + m), and select the "Errors" toggle.  I am presented with the following:  TypeError:  Error #1009.

Can anyone translate that into English for me?

Thanks in advance - 

Ryan
I have a lightning:datatable correctly showing records from my class, and I have a row level action for each of the rows - all functioning correctly if there is more than a single result in the query.  If there is only a single record from the query, then the row level action box is not displayed in an action-able window.  A scroll bar appears - but the action cannot be accessed.  Any thoughts?

Screenshot of the action with multiple rows:
User-added image

Screenshot with 2 rows:
User-added image

Screenshot with a single row:
User-added image

Thanks in advance!
I have a component utilizing the Lightning Data Services to display data from the contact object.  I can get most fields to display properly, except for standard fields that have been renamed. As you can see below, the Title, and Email field will not display.

Here is my component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens,force:lightningQuickAction" access="global" >
	<aura:attribute name="record" type="Contact"/>
    <aura:attribute name="simpleRecord" type="Contact"/>
    <aura:attribute name="recordError" type="String"/>
    <aura:attribute name="recordID" type="String" />
    
    <force:recordData aura:id="recordLoader"
      recordId="{!v.recordID}"
      layoutType="FULL"
      targetRecord="{!v.record}"
      targetFields="{!v.simpleRecord}"
      targetError="{!v.recordError}"
      
      />
    

    <table class="slds-table slds-table_col-bordered slds-no-row-hover">
        
        <tbody>
            <tr>
            	<td width="20%">
                    <b>
                    Name
                    </b>
                </td>
                
                <td width="80%">
                    {!v.simpleRecord.Name}
                </td>
            </tr>
            <tr>
            	<td>
                    <b>
                    Title
                    </b>
                </td>
                
                <td>
                    {!v.simpleRecord.Primary_Business_Title__c }
                    {!v.simpleRecord.Title }
                </td>
            </tr>
            
            <tr>
            	<td>
                    <b>
                    Email
                    </b>
                </td>
                
                <td>
                    {!v.simpleRecord.Primary_Business_Email__c}
                    {!v.simpleRecord.Email}
                </td>
            </tr>
            
        
        
        
        
        
        </tbody> 
   
        </table>
    
    
    
    
    
</aura:component>

Here is the component's result:
User-added image

Here is the Contact Object Fields and Relationships Detail:

User-added image

The renamed field menu:

User-added image

Thanks in advance for any/all help received!
Hi All - 

I've followed these posts:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/components_using_flow_inputs_set.htm
and
https://developer.salesforce.com/forums/?id=9060G000000MV43QAG

But for some reason I can't get the following variable to show up within my flow that is embedded within the lightning component.  Code is pasted below - any help is much appreciated:
 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens, force:lightningQuickAction" access="global" >
	
    <Aura:handler name="init" value="{!this}" action="{!c.beginFlow}"/>
    <aura:attribute name="accountID" type="Id" default="001W000000eUrAFIA0"/>
    <aura:attribute name="accountName" type="String" />
    <aura:attribute name="numberOfEmployees" type="Decimal" />
    
    
    
    <lightning:flow aura:id="businessInformation" >
                
                </lightning:flow>
    
</aura:component>
 
({
	beginFlow : function(component,event,hlpr) {
           var flow = component.find("businessInformation");
           
    	   
           var inputVariables = [
            {
                name : "sVarID",
                type : "SObject",
                value : {
                    "Id" : component.get("v.accountId") 
                    
                }
                //value : component.get("v.recordId")
            },
               { name : "varTest", type : "String", value: [ "2016-10-27", "2017-08-01" ] }
               
        ];
          
           flow.startFlow("deleteMe");     
           }

    
    
    
    
    
    
    
    
    
    
})
I then have a simple screen on the flow to display the variables:

User-added image
 
The Lightning Components Developer Guide warns about using the same name for client and server controller actions:
Use unique names for client-side and server-side actions in a component. A JavaScript function (client-side action) with the same name as a server-side action (Apex method) can lead to hard-to-debug issues.
I was unlucky enough to miss this tip before I debugged one of those hard-to-debug issues. To prevent others from making the same mistake, I wanted to share my debug path in case you miss the memo about naming conventions and run into similar symptoms:

PricingTool.cmp
My component contains a button that runs a client controller action named "c.getPricing"

<pre>
<aura:component controller="ServerController">
  <aura:attribute name="products" type="ServerController.ProductPrice[]"></aura:attribute>
  <ui:button aura:id="buttonGetPricing" label="Get Pricing" press="{!c.getPricing}"></ui:button>
</aura:component>
</pre>

PricingToolController.js
The controller action calls a helper action with the same name: "hlp.getPricing"

<pre>
({
    getPricing: function(cmp,evt,hlp){
        console.log('in c.getPricing');
        hlp.getPricing(cmp,hlp);
    }
})
</pre>

PricingToolHelper.js
My helper attempts to call a server-side action "c.getPricing", which is the same name as the client-side action "c.getPricing"

<pre>
({
    getPricing : function(cmp,hlp)
    {
        console.log('in hlp.getPricing');
        var action = cmp.get('c.getPricing');
        var products = cmp.get('v.products');
        action.setParams({productList : products});
        action.setCallback(this,function(res){
            console.log('in hlp.getPricing callback');
            var state = res.getState();
            console.log('hlp.getPricing ' + state);
            if (state === "SUCCESS") {
                var pricing = JSON.parse(res.getReturnValue().body);
                console.log(pricing);
            }
        });
        $A.enqueueAction(action);
    },
})
</pre>

ServerController.cls
The server code successfully passes unit testing, but when launched from my Lightning Component helper class, no "/aura" logs are created on the server, indicating the server code is never touched.

<pre>
public class ServerController{

    @AuraEnabled
    public static Response getPricing(List<ProductPrice> productList) {...}
}
</pre>

Back To The Client...
So the server action is never run, and my javascript console is growing a fearsome loop of the following log lines:
 
in c.getPricing             # client controller action triggered
in hlp.getPricing           # helper action triggered
in hlp.getPricing callback  # callout to "c.getPricing" triggered
hlp.getPricing SUCCESS      # callout successfully returned
undefined                   # the results of res.getReturnValue() are empty
in c.getPricing
in hlp.getPricing
in hlp.getPricing callback
hlp.getPricing SUCCESS
undefined

The Moral of this Story
When the helper attempts to "get" a server action from the component, it receives the client action instead, because they use the same name. This causes an endless loop on the client, where the controller executes itself again and again via the helper's action call. The callback won't throw any errors and happly continues with a "SUCCESS" state.

The fix to this all, of course, is quite simple.

ServerController.cls
First change the name of the server controller action:

<pre>
// public static Response getPricing(...) {...}
public static Response getServerPricing(...){...}
</pre>

PricingToolHelper.js
Then update the helper reference to the server controller:

<pre>
// var action = cmp.get('c.getPricing');
var action = cmp.get('c.getServerPricing');
</pre>

Happy Lightning Development!
  • March 27, 2016
  • Like
  • 1