Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

New answers tagged

0

The problem is that the refreshView event is propagating outside your tab. You can try using refreshTab instead of refreshView, it works fine for me. https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_refreshTab.htm


0

Tested in changeset: you have to add: Lightning Page(if give an error, add all lightning record page related to that app ) App Record Type (maybe not , but i used lightning record pages related to app ,recordtype and profile) Profiles(maybe not) with all these components, the "view page assigment" in lightning record page is loaded correctly .


0

i would recommend go through lightning:recordeditform. in your case why required is not fired? because you used Create Action Item lightning:button out of scope from lightning:recordeditform i used inside of lightning:recordeditform so my required attributes successfully fired. and you have to use base actions of lightning:recordeditform in your case i ...


1

You can try like this:- showNewOpportunityForm(recordTypeId) { this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'Opportunity', actionName: 'new', }, state: { recordTypeId: recordTypeId, } }); } You can mention the recordtypeId in state. Also, You can upvote this idea :...


1

Another reason that cause issues with lightning:inputField is if you don't fill the recordTypeId property of the lightning:recordEditForm, in case that exist more than one. Docu of "lightning:recordEditForm": https://developer.salesforce.com/docs/component-library/bundle/lightning:recordEditForm/specification


1

You should have multipleRows="true" in layout without which all the items will be aligned in single row and will not go to next line even if the total size crosses 12. <lightning:layout multipleRows="true" class="slds-p-bottom_small" horizontalAlign="spread" >


0

@DavidCheng please find some documentation on the Report metadata. I'm not sure why you didn't see those capital-CUST fields, although I did find this is only for standard parent fields (which are part of the Report Type). Object fields are specified in the 'normal' approach. The three filters added to the Report and shown in metadata. As you can see the ...


0

Were you able to solve this? I had a similar issue when trying to display the label on top and the value below, and I was able to solve it using the new attribute density for the lightning:recordViewForm by setting it as comfy. Source: https://releasenotes.docs.salesforce.com/en-us/summer19/release-notes/rn_aura_components.htm


1

It seems like you are trying to hide the button wherever SME_Document_Collection_Mode__c is Login via link. Modifying the columns will affect the whole table as each object in columns define the structure of whole column and not single cell in column. You can implement one more column at run time which will decide which class to append. Below is the sample: ...


2

I believe this is not possible at this moment. The Recently viewed List View is controlled by the Object's Search Layout which only can contain 1 version for that object. In classic the controller was the Tab element: https://help.salesforce.com/articleView?id=customize_recent_records_list_lex.htm&type=5 There are several ideas is in the IdeaExchange ...


0

I am using plain web custom components. Running into same issue with drag and drop. This might be a bug. To make this work I have to wrap the dropzone in div with class called "target" and do const targets = document.querySelectorAll(".target"); targets.forEach(target => { target.addEventListener("dragover", handle_ondragover); target....


1

The "Lightning StyleSheets" attribute only adds the look of Lightning, but does not actually contain the full runtime. You need to expose the flow in a Lightning App or Lightning Component. Use lightning:flow to expose a flow in a compatible experience.


1

Short of writing code, you can't implement this right now. There's an Idea you should go vote on.


1

The framework automatically destroys the old instance once unset from the attribute. There is no need to take additional action. cmp.set("v.fAttr", [newButton]); The documentation states you only need to manually destroy components if you never assign them to an attribute of the type Aura.Component[]. After a component that is declared in markup is no ...


0

Simple and elegant solution would be to extract table row to seperate component, pass whole single child as parameter, and do business logic inisde every single row component using init or change handlers. In child component You can easily declare Boolean attribute, and write nice logic to handle its value, and display via 2-way-binidng, avoiding any "dirty" ...


0

In lightning component you can use Progress Bar and use variant as 'circular'


0

You need to create an app from the app builder and add your lightning component to the app. Post this, go to Mobile Administration -> Salesforce navigation in setup and add your app to the list.


6

You are talking about event reparenting. Check this question - event.getSource() alternative in LWC? (considering origin reparenting). Consider below components chain in LWC: <c:parent> <c:child> <c:grandChild> When event is fired by grandChild, you can access all the data- attributes and any other attributes directly in ...


3

CustomEvent's provide the detail field for it to avoid any conflict with other event properties. while The target property of the Event interface is a reference to the object that dispatched the event. as per https://developer.mozilla.org/en-US/docs/Web/API/Event/target


1

To use Javascript and a lightning web component instead of aura you can use a dynamic class change variable for the section. <template> <div id="ExpandableCalendarSection" class={BookCalClass}> <h3 class="slds-section__title" style='padding-bottom:0;'> <button aria-controls="expandoBookingCalendar" aria-expanded="true" ...


1

The reason you're getting the error (which doesn't provide an answer to the real basis your question) is because of this: if(component.get("v.selectedLookUpRecord").Id != undefined){ conObj.AccountId = component.get("v.selectedLookUpRecord").Id; } Basically, it looks like component.get("v.selectedLookUpRecord") is returning a null and hence the error ...


0

For anyone stuck on at least getting to to the first level this worked for me. I am now trying to work on making this dynamic but there is an app in the exchange that will beat me to this AiflyHierarchy. Apex public with sharing class AccountController { @AuraEnabled public static List getAccountChildren(Id accountId){ List accountcontacts =...


1

Welcome to SFSE. Not sure lightning:outputField could be used in that way. But a workaround is to use lightning:formattedText instead and you need force:recordData to fetch the record field values like this : <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,...


0

I developed a LWC progress-ring component. The code is available here Quite easy to integrate :) I hope that will helps you


0

I found the issue, the Apex method needs to be a getter Method: getShiftOrders!


1

Maybe you can try assigning default values to these attributes during onInit method handler


2

You can pass ONLY strings as attribute values and so if you are passing the whole object as attribute value, it will be stored as [object Object] string and [object Object].Id does not make any sense and so it will return undefined. You should pass the Id by using data-order ="{!item.Id}" and get the record through Id as below: let orderId = event....


0

You can use Workflows for that. Take a look to this link Also, search the web for Workflows in Salesforce.


0

I could distinguish the lookup components by inserting an attribute for Lookup1 and Lookup2 that would be implemented in the parent with the attribute defined and then passed down to the child component the event gets fired. I included this attribute in the event and then could evaluate which component did fire the event.


0

The "Sort by" option is available only when you actually search for articles in the component. If you type some string in the search bar and click enter you'll find that you can sort the results. It doesn't actually apply to "Suggested Articles" which is what your screenshot is on and the default view that loads when you're on a case. https://help....


1

I ran into this same problem running the basic example code for "Creating a Record" in the record-edit-form component reference documentation. I was able to fix my issue with that specific example by adding the lightning__Tab target to my js-meta.xml file, so that it looked like this: <?xml version="1.0" encoding="UTF-8" ?> <...


0

Instead of aura:if I used the aura:id and hide and show for the classes, and that did function var showAccount = component.find("auraid"); $A.util.addClass(showAccount, 'slds-show'); $A.util.removeClass(showAccount, 'slds-hide');


1

As the documentation says, you can't use lightning:overlayLibrary in Lightning Out. You'd need to use your own. You might look at strike_modal instead. You'll need to create a component that will dynamically create the other components, and your dependency app must list all components that will be used dynamically.


0

Is it possible for Flow to choose the previous Placement record from the Account and retrieve information to populate the new Placement? Essentially I just want Salesforce to choose the first child record to populate the new Placement upon creation if a Placement already exists on the Account -else, continue to create a new Placement. How would I go about ...


0

I believe what you're looking for is something like: <aura:iteration items="{!v.contacts}" var="contact"> <aura:if isTrue="{!contact.IsPrimaryContact__c}"> <lightning:icon iconName="action:approval" alternativeText="IsPrimary" /> <aura:set attribute="else"> <your-button-component-here> &...


0

if I'm not mistaken, the issue here is that you are trying to run this flow as a portion of a visual force page. If this is the case, then it will not work, as flows that are embedded in a visual force page will run using the classic runtime regardless of if lightning runtime for flows is enabled or not. More information can be found below: https://help....


1

You can use "Get Records" to retrieve the placements using as filter the account lookup field equal to the selected Account Id. UPDATE: You can trigger it using Process Builder or a trigger based on the record update


0

You can do that by applying an onchange attribute on your field. onchange={yourmethodhere} Then on your JS add a function: yourmethodhere: function (component, event, helper) { // Your code here } These are the basics... Applying the onchange to the field that you want to add the logic is basically the first thing you need to do. Them make sure that ...


0

You can create an attribute to store the latest search id with name searchId. Then you can use separate methods for keyup and keydown to search and then remove the previous search id. CMP: <aura:attribute name="searchId" type="Object" /> <span onkeyup="{!c.handleSearchEvent}" onkeydown="{!c.handleClearSearchEvent}"> <lightning:input ...


0

If you look at the timer event handler, it is using "this". I assume you want this to reference the helper. In which case you need to change how you set the timer: timeId = setTimeout(helper.handleSearchEventClicking( component, mapName, listForSearchDisplay, controllerMethod, event.getSource()...


2

Instead of Student_Name__r.Id, just use Student_Name__c. They technically mean the same thing, but doesn't fall foul of the relationship rule. In general, you should actively avoid the use of __r.Id instead of simply using __c, because it is more efficient in terms of memory use, amount of code you need to type, and to avoid certain classes of errors such as ...


1

When you use a function for a wire, but still want reactive behaviour against the result of that wire, you need to introduce a separate variable declaration, like: @track registro; @wire(getPagedContactList, { objectToDisplay: '$objToRender', nameSearchKey: '$nameSearchKey', maxNrRecords: '$maxf', pageSize: '$pageSize', pageNumber: '$...


1

extends="force:slds" include this at the top in your application like <aura:application extends="force:slds">


0

The error stems from the line var auraConfig = ; You should either assign something here or remove the equals sign and just have a declaration.


1

It worked for me. Below is my connected app settings. key is eventhough your heroku app doesnt have any authentication you still need to enable oAuth settings in connected app


0

We can make use of Lightning Data service to access any of the user fields on the Lightning component without need to use apex controller. Example: <aura:attribute name="currentUser" type="User"/> <force:recordData aura:id="recordLoader" recordId="{!$SObjectType.CurrentUser.Id}" fields="Profile.Name" targetFields="{!v.currentUser}"/> Access ...


1

Javascript is CaSe sEnSiTiVe. Its not Const, its const const selectedCheckBox = this.options.find( checkbox =>{


0

You may find that your User>Profile>Name is "System Administrator". Check in Setup>Profiles. You can also use filter logic for more complex conditions.


0

I don't really know why this happens on Chorme\ Explorer - But on Firefox it's working fine. Because this is an uncomfortable solution I will not post this as an answer. Hoping for someone who can share his knowledge about this - for entering to docs with the same browser I'm working on... Not working : 1.Clear the browser cache 2.Incognito mode


0

Yes, it is possible! Simply make the Phone field the second field in the Account object's Search Results layout. This can be done from: Object Settings > Account > Search Layouts > Search Results > Edit When performing a full search, the results returned are records whose 'Names' or secondary fields (ie. the second field in the Search Results layout) ...


Top 50 recent answers are included