Skip to main content

#Aura Components0 personne en discute

Hi!

 

As many of you might be aware of, a known limitation of Salesforce list views is that it does not automatically refresh, and if you want to know if there are new or modified cases that fulfill the list view cnditions the user needs to manually click a Refresh button (as always, there's an Idea for this).

 

The most common workaround is probably the Salesforce Grid Refresher. However, we didn't want this issue to be dependent on the users installing an app (I can barely teach a user to find the correct list view, I'd rather not try to teach them how to install browser extension apps).

 

Luckily, there's this brilliant post by @Josip Juric👏 out there: Auto-refresh Case List Views in Salesforce Lightning Service Console Apps (I'm just assuming I tagged the right Josip here).

In this post, you see how one can use an Aura Component in the Utility Bar to trigger an automated refresh of a list view.

 

We implemented this a couple of months back, and it's been working splendidly, however, it seems to have stopped working following the Winter '25 release. My assumption is that this is due to the latest performance enhancements for List Views (Get Better Performance for List Views on Custom and Standard Objects).

 

I've done some debugging, and the component still runs as expected, and will on frequent intervals call navigationItemAPI.refreshNavigationItem() (refreshNavigationItem() for Lightning Experience | Salesforce Console Developer Guide | Salesforce Developers). But even though the response is true, nothing happens with the list view.

 

Anyone experiencing the same issue and know a fix? 😊

 

@* Salesforce Developers * @* Release Readiness Trailblazers * @Serviceblazer Community Group #Aura Components

5 réponses
0/9000

Hello all,

I couldnot able to get the basic Aura example  output. below is the Applicaion, JS and Component code snippet. Please help me out where i was wrong.

 

When i click the button , the output should be displayed as "nothing and nothing here too"

but none has got displayed. 

Hello all,I couldnot able to get the basic Aura example output. below is the Applicaion, JS and Component code snippet. Please help me out where i was wrong.

 

application

<aura:application extends="force:slds">

<c:JavascriptAura/>

</aura:application>

 

JS code

({

handleClick : function(component, event, helper) {

component.set("v.Mesg1", "nothing");

},

anotherHandleClick : function(component, event, helper) {

component.set("v.Mesg2", "nothing here too");

}

})

 

component code:

<aura:component >

<aura:attribute name = "Mesg" type= "string"/>

Hello : {!v.Mesg1}

<br/><br/>

Hai: {!v.Mesg2}

<br/><br/>

<lightning:button label="Press Here" onClick="{!c.handleClick}"/>

<lightning:button label="Click Here" onClick= "{!c.anotherHandleClick}"/>

</aura:component>

 

@Benazir Beham@* Salesforce Developers * #Trailhead Challenges #Salesforce Developer #Aura Components

3 commentaires
0/9000

public class SendMoney2 {          @auraEnabled          public static void SendDet(String acName,String acNo,String acIfsc,integer acAmt){                  Customer_Account__c acc=[select Account_Number__c,Name,IFSC__c,Balance__c from Customer_Account__c];                  if(acc.Account_Number__c == acNo && acc.Name==acName && acc.IFSC__c==acIfsc){                          acc.Balance__c =acc.Balance__c + acAmt;             update acc;         }             }      }

 

 in this code i am facing some issue like variable does not exist.Compiler showing no error but when compile time i got error.please help to me. #Trailhead Challenges #Lightning Web Components #Aura Components

0/9000

Hii All,

I am working on custom object and aura component.

I need to check in aura cmp if some record data is updated in custom object dynamically without refreshing the aura cmp page.

If the record is updaetd in backend due to some process...I need to perform some logic in aura.

Thankyou in advance. 

#Custom Object  #Aura Components

0/9000

Hi all,

 i am inserting single record with single attachment using lightning aura component.but how to insert single record with multiple files in single transaction.how i am achive this please let me know.

 

Please refer this link how i am make changes for multiple files.

http://sfdcmonkey.com/2017/09/25/file-upload-lightning-component/

1 commentaire
  1. 2 sept. 2021, 08:07

    Hi @venkatesh j,

     

    you can set the "multiple" attribute to true in lightning:input type="file".

    Hope this is helpful :

    <lightning:input name="file1" type="file" label="Attachment"

    multiple="true" onchange="{!c.handleMultipleFiles}"/>

     

    handleMultipleFiles: function (component, event) {

    let files = event.getSource().get("v.files");

    console.log("all files : ", files);//contains the array of selected files

    alert(files.length + ' files !!'); //displays no. of files selected

    }

0/9000
Wendy Farzan (Deloitte) a publié du contenu dans #Email Address

Trying to trace an error message related to a bad email address.  We have a webform created with Aura Components.  The email field is pulled from a custom object.  If you type "john" or "john&" or even "John@" you get a standard message: "You have entered an invalid format. Enter a value."

 

But once you add a character after the "@" without completing the email address you get this:

 

{"message":"An error occurred while trying to update the record. Please try again.","detail":"","output":{"errors":[],"fieldErrors":{"Submitters_Email_Address__c":[{"constituentField":null,"duplicateRecordError":null,"errorCode":"INVALID_EMAIL_ADDRESS","field":"Submitters_Email_Address__c","fieldLabel":"Contact Email Address","message":"Contact Email Address: invalid email address: john@q"}]}},"error":{"status":400,"body":{"message":"An error occurred while trying to update the record. Please try again.","statusCode":400,"enhancedErrorType":"RecordError","output":{"errors":[],"fieldErrors":{"Submitters_Email_Address__c":[{"constituentField":null,"duplicateRecordError":null,"errorCode":"INVALID_EMAIL_ADDRESS","field":"Submitters_Email_Address__c","fieldLabel":"Contact Email Address","message":"Contact Email Address: invalid email address: john@q"}]}}},"headers":{}}}

 

Any thoughts?  I didn't write the code....I'm trying to figure out where this message is coming from so I can fix it.

 

Thanks!

0/9000

Hey everyone!

 

My latest video is live on Youtube - Lightning Aura Components ~ Dynamic Record Lists

 

Feel free to comment, like, subscribe and share but most of all please leave some feedback on how I can improve them or what you wish to see next. I make these to hopefully empower you all and help you in your day to day lives!

 

https://www.youtube.com/watch?v=j_tgqR6YEu8

 

@Platform Champion Alumni @* Salesforce Developers * @Developers at Dreamforce @* Salesforce Administrators * @Trailblazer Community Cove @Trailblazer Mentorship @* Lightning Now! *

Lightning Aura Components ~ Dynamic Record Lists

0/9000

Hello everyone!

I need help with a problem that I have. 

I have two sandbox with the same lightning component and the same code,I compare with clickdeploy.io, BUT, In one sandbox is working fine when doInit initialize, but in the other sandbox is not working. There are two components related, the parent component and the child. The parent component doInit method is working fine, but the child component is not working, It doesn't even run the doInit of the child component. This causes the functionality does not load correctly. The strange thing is that in one sandbox it works correctly but in the other it doesn't, even though it has the same code and components.

 

Code of sandbox 1

 

Cmp

 

<aura:component implements="lightning:actionOverride,force:lightningQuickAction,force:hasRecordId,flexipage:availableForAllPageTypes" controller="OM_ActionPlanTemplateCreationController">

    <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> 

    <aura:attribute name="taskdependencyList" type="String[]"/>

    <aura:attribute name="TemplateID" type="String"/>

    <aura:attribute name="aptwrapper" type="OM_APT_TaskTemplate__c[]" />   

    <aura:attribute name="apt" type="OM_Action_Plan_Template__c" default="{'sobject':'OM_Action_Plan_Template__c'}"/> 

    <aura:handler name="deleteRowEvent" event="c:OM_DeleteRowEvent" action="{!c.removeRows}"/>

 

...... More code

 

                        <tbody>

                            <aura:iteration items="{!v.aptwrapper}" var="item" indexVar="index">

                                <c:OM_APTRowItem Apt="{!item}" AptTemplate="{!v.aptwrapper}" rowIndex="{!index}" taskId="{!item.id}" TemplateID="{!v.TemplateID}"/>

                            </aura:iteration>                                           

                        </tbody>

 

Code of sandbox 2

 

<aura:component implements="lightning:actionOverride,force:lightningQuickAction,force:hasRecordId,flexipage:availableForAllPageTypes" controller="OM_ActionPlanTemplateCreationController">

    <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> 

    <aura:attribute name="taskdependencyList" type="String[]"/>

    <aura:attribute name="TemplateID" type="String"/>

    <aura:attribute name="aptwrapper" type="OM_APT_TaskTemplate__c[]" />   

    <aura:attribute name="apt" type="OM_Action_Plan_Template__c" default="{'sobject':'OM_Action_Plan_Template__c'}"/> 

    <aura:handler name="deleteRowEvent" event="c:OM_DeleteRowEvent" action="{!c.removeRows}"/>

    

...... More code

 

                        <tbody>

                            <aura:iteration items="{!v.aptwrapper}" var="item" indexVar="index">

                                <c:OM_APTRowItem Apt="{!item}" AptTemplate="{!v.aptwrapper}" rowIndex="{!index}" taskId="{!item.id}" TemplateID="{!v.TemplateID}"/>

                            </aura:iteration>                                           

                        </tbody>

 

The problem is when aura:iteration call other component, in the sandbox 2 does not load and sandbox 1 does load. If someone has happened I appreciate the support or if you have any idea how to solve this problem.

 

I am attaching the screenshot of each sandbox.

 

Thank you

0/9000

Hey All!

 

I have a new video up about creating Lightning Aura Components... Super simple, basic looking component which renders a list of records - Designed to get aspiring or junior devs creative mind flowing and giving them a base to start with!

 

It would be great if you could hit the like button and/or subscribe on the other videos too if you find them useful!

 

@* Lightning Now! * @* Release Readiness Trailblazers *  @Developers at Dreamforce  @* Salesforce Developers *  @* Salesforce Administrators *  @Salesforce Automation Hour  @Trailblazer Community Cove  @* Trailhead Official *  @Platform Champion Alumni @The Blog Group  @Salesforce Business Analysts  @Admin Tricks@All Dreamforce 

Simple Record List - Lightning Aura

15 commentaires
0/9000

We are planning to implement Twilio Flex with salesforce. For POC purpose I have to make a voice call on button click in a lightning web component/Aura component. How can I achieve this? We are on the VF page by calling sendCTIMessage() with the help of  "/support/api/26.0/interaction.js" and Twilio (not Twilio flex). Any thoughts?

 

I see to use 'support/api/48.0/lightning/opencti_min.js' in lightning experience. But still figuring out how what function to call and how Flex and Salesforce are going to talk each other once I made a call.

0/9000