New answers tagged

0

Have you tried creating a process builder node on case change checking case closure condition which calls a screenflow which launches your component in it(making your component available for screenflow by implementing the availableforscreenflows interface in lightning)? I think this will solve your issue on simulataneous access by agents as the flow will be ...


0

Alternatively you can go with creating a wrapper class in Apex with string and Id as members and then change your controller to populate the wrapperclasslistinstead of sobject list and pass it to your component. Wrapper class : public class ObjectStringWrapper { public String Str; Public Id Id; } Change you controller like below since you are ...


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

Working perfectly after making parent div position:relative Source


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{ ...


1

Your visibility filter on the component is probably not set to have it show on the mobile app. It should be set to "Device not equal to desktop" to show on mobile. You should read through the Lightning App Builder Considerations article. Specifically this: Component Visibility Rules If a visibility filter assigns a component to “Device equals ...


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&...


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 ...


2

You're not allowed to do this in Apex for some reason. You'll need to either make an API call, or list all the objects to search dynamically by creating a search string. The latter would probably look like: String[] types = new String[0]; for(sObjectType sType: Schema.getGlobalDescribe().values()) { if(sType.getDescribe().isSearchable()) { types....


0

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


0

Just documenting answer to this issue which was not very clear from any of the examples I came across in the documentation and lwc-recipe examples. mistake in the above example was, refreshApex(this.records) this.records that is passed to refreshApex is assigned only with the data attribute from the wired result and not the entire result, like this this....


0

Currently, I don't see any direct sfdx command to deleting LMS from org but you can use destructive changeset to delete.


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 ...


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]....


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"> &...


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

Based on Aura component rendering life cycle, Init event happens when the aura component construction finishes but before rendering child components. In your case, combobox is rendered on the parent component after Init event. In Init event, combobox has not been rendered when you call component.find("selectedSOrg"), it returns undefined. ...


2

Please check if the VF page and class have version > 46. There is a lookup to contact on Opportunity which is stamped to the primary contact of that opportunity. See here If you don't want the relationship to come in a describe call then, you will need to explicitly exclude it OR use the components with API version < 46 (It would be a security issue ...


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 ...


1

In your init function your helper method helper.getWOIdNow runs asynchronously and before it gets a response it moves on to the next line.. so your best bet is to take all the lines in your init method after the helper function and add them in helper.getWOIdNow once you have the record ID, or break it down into a separate function and call it after you ...


0

Rather than processing server response JSON in controller or handler I would recommend you to create the domain(wrapper) classes in Apex in the exact expected format and return that response from apex methods. Then your response.getReturnValues() will be automatically parsed in the same format and you will not need any additional processing in controllers/...


0

I solved this problem by creating a new variable named VarParentId and assigning it to equal {!Get_Account.ParentId} in a previous step of the flow. I then set the component visibility condition to {!VarParentId} Does Not Equal {!$GlobalConstant.EmptyString} and it is now working correctly, hiding the component when the ParentId is blank. It seems like this ...


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): ...


1

Instead of utility:success, You can use action:approval @track data = [ { "id": "a012w00000BsGhwAAF", "programName": "Week 1 : 3D printing", "selectedIcon": "action:approval", "startEndDate": "08/10/2020 - 08/14/2020" }, { "id": "a012w00000BsGhxAAF", "...


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> ...


3

You need to wait for the call to complete: async handleSubmit() { return callServerToSave({"recId" : recordId}); } async handleNavigation() { try { let result = await this.handleSubmit(); NavigationMixin.... } catch(error) { // Deal with the error from handleSubmit } }


1

We're looking at shipping (GA) the localization support in the Lightning App Builder in Winter '21 (Safe Harbor) and as Kristian has pointed out, the design attribute defaults are on the roadmap but not yet prioritized. (I work with Kristian on the Product side)


0

It is not possible to make a field conditionally editable. The way I solved it, was to change the cellattributes conditionally, so I changed the background color to indicate to the user that something is different: cellAttributes: { class: { fieldName: 'CSS_Class_Quantity__c' } } But that is not enough, your Javascript code must not take into account the ...


0

A List View can be migrated using ChangeSets. You need to choose the List View Component to select your List View. Here is a consolidated list of items that can be migrated using Changeset. List of components migrated using changeset


0

You can select the List Views from the Components list and then add the same to the Change Set. But just make sure that the Filter Criteria of the List View(s) which you are unable to add to the Change Set are not filtered by a Queue. We have the known issue created for the same:https://trailblazer.salesforce.com/issues_view?id=a1p300000001AHTAA2 Also refer: ...


0

You can setup a force.com site. It is essentially a visualforce page that can call any controller of your choice. The site can be exposed like any other website..


2

You can setup it in init method on component like this <aura:component> <aura:attribute name="attributeFromLabel" type="String" access="GLOBAL" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> </aura:component> in JS ({ doInit: ...


2

As you have noticed, this is currently not a supported feature (source: I'm on the Lightning App Builder team). Setting labels in App Builder is on the short term roadmap, but defaults looks like is further out (safe harbor). Best option right now is to set the label programmatically in the controller, and then use the design property in the builder as a way ...


0

Please try using new window.Gauge(ctx).setOptions(opts) instead of using new Gauge(), that should work. I was able to get it working in LWC by adding the below snippet to your boilerplate code. var opts = { angle: 0.15, // The span of the gauge arc lineWidth: 0.44, // The line thickness radiusScale: 1, // Relative radius ...


2

Here parent component is passing account-name prop to child. You don't need connectedCallback() in child for the custom logic, rather you need renderedCallback(). More detailed documentation here child.html <template> <p>Helllo this is child</p> <p>{accountName}</p> </template> child.js import { ...


1

Make the following changes in parent component and it will start working. Parent Component: JS import STATUS_FIELD from @salesforce/schema/customObject__c.status__c; import { getRecord } from 'lightning/uiRecordApi' const FIELDS = [STATUS_FIELD]; @api recId @track status; @track error; @track flagIndicatingDataHasBeenLoadedInVariables = false; @wire(...


0

you should use event.getParam('detail') instead of event.getParams() in my scenario i added validation rule on contact object firstname field. cmp <lightning:recordEditForm onerror="{!c.handleError}" objectApiName="Contact"> <lightning:inputField fieldName="FirstName" /> <...


0

Please try by using style="width: 100%;" with your lightning-datatable tag. It's working for me. Example :-


2

As suggested by @User6670 you need to pass the additional attribute to store the checkbox value. In addition to splice, you can also use the filter method to remove the unchecked record. storeid(event){ if(event.detail.checked){ this.checkedId.push(event.detail.val); } else { this.checkedId = this.checkedId.filter(rowId => rowId !...


2

You can send an attribute in event which will tell you whether the checkbox is checked or not like this const customEventCheck = new CustomEvent('childevent', { detail:{val:event.target.value,checked:event.target.checked} }); and in parent based on that value you can add or remove the element var rowId = event.detail.val; var checked=event.detail.checked; ...


0

Similar to the comment on your question from zaitsman, use a formula. The formula will want to protect itself based on whether there are multiple levels, something like: IF(NOT(ISBLANK(ParentId)), IF(NOT(ISBLANK(Parent.ParentId)), Parent.Parent.Name, Parent.Name), Name) If I got the brackets right, the idea is to take the grandparent ...


0

You can also try creating a visualforce page/Tab and add your component to that page using lightning:outApp.


0

This feature is available to Salesforce Orgs with Enterprise, Performance, and Unlimited editions for an Extra Cost. You may refer the same in below link. Include External Data in Reports


0

As per the suggestion of @sfdcfox ,one flag__c per card was used, not just one global value. Here flag__c picklist was created having two values 'Deleted' and 'UnDeleted'. For selected Checkbox card, the value 'Deleted' will display. Change: <aura:iteration items="{!v.IntIndex}" var="item"> <...


Top 50 recent answers are included