New answers tagged

0

If the feedback on Case closure is a hard requirement, you may want to go with a custom Action/Button which calls a custom Lightning Component or Lightning Flow that combines the Case status update and feedback questions. The Action/Button can be added to the Case Page Layouts and the List View Actions as required (just not to the Recently Viewed List View) ...


0

Try this piece of code for your controller as it takes recordId and figure outs the Object Type by checking into the prefix of the recordID. Hope this solves ur purpose. @AuraEnabled public class CustomSearchController { public static String findObjectName(String recordId){ String objectName = ''; try{ ...


0

The id for the div's selector class has to be unique for each instance used on a page. So added a pselector attribute which is set to random number during initialisation and assigned as div class: <aura:component implements="flexipage:availableForAllPageTypes,force:appHostable,force:hasRecordId"> <aura:attribute name="recordId&...


1

You cannot nest the merge fields. URL must be generated inside the single merge field {!}, and inside you can concatenate the variables and string. Following would be the psuedo code and the query parameters must be separated by ampersand sign (&): {!'/p/attach/NoteAttach?pid=' + v.recordId + '&amp;parentname=' + v.simpleRecord.CaseNumber + ...


0

Something to check: When you open the action from another record, does v.recordId change to the new record's value? If so you might be able to put a change handler on that attribute and use it to trigger a refresh.


0

Have you tried loading a record using force:recordData? For example, you can put this markup on your lightning component and it should be able to load your data without using Apex at all. This feature is a part of the Lightning Data Service. <aura:attribute name="simpleRecord" type="Object"/> <aura:attribute name="record&...


2

While documentation is says that ShowToast is available in Lightning Experience, but not in Lightning Communities, it is actually supported in Lightning Communities, except the login page. There is information here: force:showToast is not available on login pages. https://www.thecloudfountain.com/salesforce-lightning-forceshowtoast/


0

I had the same issue. Even though lightning cache is disabled the page still doesn't update sometimes. I have to continually crtl + shift + delete in chrome to bring up the delete cache menu over and over to ensure the changes are made in the Lightning Component. Well, guess what the command to delete a file in Developer Console is? ctrl + shift + delete. I ...


0

I am facing exact same problem but in Lightning Web Component, not in aura component. Do you have any solution for LWC component? Thanks.


0

try using "onrowaction": component.get("c.handleRowAction"), instead of "onrowaction":"{!c.handleRowAction}", when you are dynamically creating the lightning:datatable component


0

Since you want to display all contacts for all accounts in hierarchy you can change your code to find the Account at the top and go downwards from there. This way you can find Accounts in other branches of Account Hierarchy. Also be careful this code will run a lot of SOQL based on the depth of hierarchy. public with sharing class AccountHierarchyController {...


0

The steps need to be dynamic, so you need an array attribute. <aura:attribute name="steps" type="List" default="[]" access="private" /> The attributes should be reactive in addition to an init handler: <aura:handler name="change" value="{!v.totalSteps}" action="{!c.update}" /> ...


1

You need to look this lightning:progressIndicator. Official documentation - https://developer.salesforce.com/docs/component-library/bundle/lightning:progressIndicator/example#lightningcomponentdemo:exampleProgressIndicator SLDS documentation - https://www.lightningdesignsystem.com/components/progress-indicator/


0

Dane, I have tried to run ur code version 2. It seems that the error is that, It is unable to create component as if you check for status === "ERROR" and log the error you will get No COMPONENT named markup://c:meshSupport found And also if possible please put some more info. about the question asked.


0

You're trying to compare a Date to a string, which is why it fails. There's no need to use the localization service to convert the dates to strings. let endDate = new Date(); let startDate = new Date(endDate.getTime()-(365*8.64e7)); let resultfilteredarray = Dataarray.filter(a => { var date = new Date(a.CreatedDate); return (date >= ...


3

At least you can access the form factor of the hardware the browser is running on in LWC: import formFactorPropertyName from '@salesforce/client/formFactor'; formFactorPropertyName — a name that refers to the form factor of the hardware running the browser. Possible values are: Large — A desktop client. Medium — A tablet client. Small — A phone client. ...


0

Two things are missing in this code. Application needs to have ltng:outApp extended and VF Page should have the code block(some div with ID) to embed the body. Reference to official documentation - https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm


1

This is not exactly the answer but hopefully it can guide you to it. Try to explore the salesforce lightning design system. You won't be able to control if its desktop or mobile, but you'll be able to adapt the design based on the size of the screen ( which in my opinion can already give you an idea which type it is) here is a link to help you with the Slds-...


1

When you are talking about subtab you mean subtab in lightning console? If yes, that's possible quite easily. Youre component needs to be url addressable so it can be opened by workspace api: <aura:component description="MyComponent" implements="lightning:isUrlAddressable"> Your main component needs to have workspace api included &...


0

You can pass parameters appended in URL itself. For this, you need to have isUrlAddressable implemented. Documentation link - https://developer.salesforce.com/docs/component-library/bundle/lightning:isUrlAddressable/documentation Copying example from Documentation - You can pass param in URL like this - /lightning/cmp/c__helloTarget?c__title=Director In ...


2

It appears this is still not a standard function for salesforce, but I found this work around. You can drag and drop this lightning component to any lightning page your quick action is on and it will redirect to the newly created record. It uses the link from the default success toast message so be sure to leave the 'Success Message' field blank. Hope it ...


3

You have typo here. You can see your iteration happened already 2 times. Only data is not displaying. In aura iteration we don't use V tag. Ref - Example in Aura Doc Please try with this - <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" controller="FolderItemController"> <!-- Dynamically ...


0

You are in controller function which is in Javascript and Javascript is Case-Sensitive. You are using True, which is not present in javascript. Try updating this block - First way if(res[0].Integrated_lead__c && res[1].Integrated_lead__c ){ toastEvt('Selected Leads are integrated Leads and cannot be merged'); } Second way if(res[0]....


3

You would need to patch in a field "isNotActive" in your data so you can use the opposing value. There's no way to do otherwise with buttons. If you use the action column instead, you can conditionally determine what to display. This is actually in the documentation: // Other column data here { type: 'action', typeAttributes: { rowActions: this....


0

Below is my understanding :- It's because of the CSS class slds-p-around_medium. This adds padding around the div. If that div is inside the iteration, the padding repeats itself. If it's outside the iteration, I only get one padded div.


0

This is an example with LWC lightning-datatable using button as a column and retriving the information with onrowaction, but, the same should be applied to Aura Component lightning:datatable onrowaction will return the action trigger in the row, it means, from An action field type, from a button or button-icon. Javascript event: event.detail.action.name =&...


3

If you want some space left between the cards, you can use margin class like added below(depending on your need either you can make it less or more) - For doing less(try this ) - slds-m-top-xxx-small For doing More(try this ) - slds-m-top-x-small or slds-m-top-small or slds-m-top-medium <aura:component controller="ContactListController"> &...


0

Assume your query is in apex controller, then it can run dynamic query return to the JS structure (json might be the best) with all the require input for drawing the graph. Something like: //Construct dynamic SQL list<AggregateResult> aggResult = Database.query('select count(Id) cnt,' + GroupField1 + ',' +GroupField2 + ' from Case group by ' + ...


1

This issue has been identified as a Chrome issue than the salesforce issue. The timing of the chrome issue and Salesforce release is a coincidence. You can follow the bug here Hopefully, this will be resolved with the next chrome update. You can follow the known issue here


1

There have been issues with utility icons reported in the past and Salesforce identified them as bugs. I recommend raising a support case to confirm the behavior utility:pin and utility:pinned icons mentioned in the LightningDesignSystem are not rendered in the Lightning components Work Utility icons on community pages disappear from the page when the chat ...


0

initee isn't a valid handler name. The two standard supported names I know of today are init and change, for aura:valueInit and aura:valueChange, respectively. You could create a custom event and name it as such, but it would have no special meaning in the Aura framework.


1

No need to set params since your apex Method does not have any parameters doInit : function(component, event, helper) { var action = component.get('c.getContactList'); action.setCallback(this,function(response) { var responseValue = response.getReturnValue(); ...


0

Put @AuraEnabled before all the initialisation i.e., @AuraEnabled public static List<ContactDecorator> parToRefer {get;set;} @AuraEnabled public static List<Contact> referredPar {get;set;} @AuraEnabled public static Id accountId; @AuraEnabled public static String status {get;set;} @AuraEnabled public static String ...


0

Stack depth exceeded indicates an infinite recursive call. This might happen because the attribute is passed back and forth between parent and child infinitely for some reason. You may need a second attribute to fix this. I think you also need to use a change handler, instead: <aura:attribute name="mapValues" type="Object" /> <...


1

This doesn't seem to be right way of applying the styles. Usual and recommended path is to define style classes in static resources, use them in component, then dynamically apply classes in the HTML markup.


0

The response I got from Salesforce support was that it's not possible from a lightning component, but I was able to work around it. See my answer here. Since using events between a Visualforce page and a canvas app is supported, I wrapped our canvas app in an empty Visualforce page and used this blog article as an example to communicate between the ...


0

These solutions did not appear to work for lightning-tabset in lwc. Interestingly aura's tabset has a class attribute, while lwc tabset does not. What does that tell us about why the same CSS override solutions do not work for lwc today? Borrowing from this solution this seems to work with lwc's tabset. It admittedly feels very hacky. renderedCallback() { ...


1

You can use action attribute which can have component as its value but you have to change the css manually to put it at correct place <lightning:accordion aura:id="accordion" activeSectionName="B"> <lightning:accordionSection name="A" label="Accordion Title A" > <aura:set attribute=&...


1

No, you can't do this with the built-in component. You could write your own custom component, though.


0

So I figured out a solution. Simply wrap everything with these: <div class="slds-grid slds-gutters"></div> and then <div class="slds-col"></div> around each list (my earlier code snippet) and I ended up with this: Now I just need to work on the sorting logic for the 3 lists so the problem is essentially solved. ...


0

You could just use a regular submit button which you can hide. I used this approach because the submit() method didn't fire the onsubmit of the recordEditForm. Component code: <button type="submit" name="submitForm" aura:id="submitForm" id="submitForm">Submit</button> Submit code (controller / helper): ...


0

I think you will need to change the structuring of your code to include 3 arrays containing the countries. You will need to prepare these arrays beforehand and use 2 iterations to render content. Here is a sample LWC code to demonstrate it (yours is aura but this is the quick way to view what you want). HTML: <template> <div class="app slds-...


1

Presently, it is not possible to specify custom labels as components' design attribute defaults if that's the ask. This is on the roadmap but not yet prioritized. As a first cut, we're looking to ship support for specifying custom labels (also used for label localization) in the Lightning App Builder in Winter'21 (Safe Harbor).


0

Not sure where you want to maintain your translations, but here's a working example. If you keep an object that contains all your variables keyed first by their name, then by the language identifier, after that it's pretty simple to dynamically assign those variables based on the currently selected language. So for a template like this... <template> ...


0

Follow Case: No, it requires creating and deleting and EntitySubscription record. I do not see EntitySubscription as the supported object in UI API so you will need an Apex controller. Edit Case : Yes, using lightning-record-form or lightning-record-edit-form. Delete Case : Yes,using standard deleteRecord adapter. Change Case owner : No, OwnerId field is not ...


2

My guess is that you have tried to follow the advice in this blog post in order to implement communication between Lightning and Visualforce. If so, you should probably forget it. This blog post includes hard-coded vfOrigin and lexOrigin values, and glibly states that "In a real-life application, you should obtain this value dynamically instead of ...


2

As the documentation says: Use aura:method to communicate down the containment hierarchy. For example, a parent component calls an aura:method on a child component that it contains. To communicate up the containment hierarchy, fire a component event in the child component and handle it in the parent component. Using aura:method to communicate to the parent ...


1

That's expected. When you try to print out a javascript object on the page you'd get [object Object] - https://www.w3schools.com/js/js_object_display.asp Your map is most likely reaching the lightning component. Did you check the console.log output in the browser ? Please put the output here for more clarity. If all is well, you should be able to see the Map ...


0

I basically use sticky css on the footer making sure the footer element is with the modal content, which is the complete modal content for a force:lightningQuickActionWithoutHeader With this, the footer will always be sticky to the bottom of the body and the all the content in Body1 div will be scrollable and will scroll under the footer. <aura:component ...


0

Try firing the e.force:refreshView event after your data change occurs. This event will cause components on the page to refresh themselves, without causing a full page refresh and loading all of the framework code.


Top 50 recent answers are included