New answers tagged

0

force:refreshView was supposed to work. See if this information helps: http://simpluslabs.com/working-and-usage-of-forcerefreshview-in-lightning/ debug the code to see if it is really going through this line($A.get('e.force:refreshView').fire()): enter link description here If it doesn't help, share the code.


2

refreshApex appears to return a Promise, according to the documentation. You can chain that Promise later: refreshApex(this.wiredContactRoleResult) .then(result => alert('refreshApex completed!') .catch(error => alert('There was an error!');


-1

Just try calling the wired method again and write your logic there. @wire(getLstOfContactsWithRoles, { accId: '$accId', reload: '$reloadContacts' }) wiredContactRoles(result) { this.wiredContactRoleResult = result; const { data, error } = result; if (data) { // This has Generic Code } else if (error) { ...


0

Additionally remove the space between variable (field api) and values for example: /lightning/o/Order/new?defaultFieldValues= Name={!URLENCODE(Opportunity.Name)}, OpportunityId={!Opportunity.Id}, ShipToContactId={!Opportunity.Primary_ContactId__c }, Customer_ContactId__c={!Opportunity.Primary_ContactId__c}, Freight_Cost__c={!TEXT( Opportunity....


1

You are resubmitting the form on button click you don't need to call createCase() on button click it will automatically create the case you just have to set the type of button as submit and leave it <lightning:recordEditForm onsuccess="{!c.onSuccess}" aura:id="createCase" objectApiName=...


1

This kind of inconsistencies is a known issue (under review): https://success.salesforce.com/issues_view?id=a1p3A000001Yn5PQAS. Mind that there are other inconsistencies under reviews as well in the current release (Spring '20). E.g. when fields used in Related Record components are updated multiple times, the RR component in some cases does not reflect the ...


0

Worked with salesforce support and they found this to be a platform bug that they will be working on as a bug (with the bug id of W-7599458, not sure where I was expected to check back on that?). So as for now, this is not achievable using the LWC treegrid component.


0

Yes, it is possible. You could leverage the "Event Monitoring" feature. Event monitoring provides tracking for lots of types of events, including: Logins Logouts URI (web clicks) Lightning (web clicks, performance, and errors in Lightning Experience and Salesforce1) Visualforce page loads API calls Apex executions Report exports All these events ...


0

If you want to disable the import button as long as there is no file uploaded. fileSelected(event) { this.inputFiles = (event.target.files.length === 0) ? false : event.target; }


5

Create a tracked variable inputFiles to read the uploaded files. Use a getter to return the boolean if atleast 1 file is selected. Use that getter variable for dynamically managing disabled attribute of button. HTML: 2. Upload CSV File to Insert <div style="width: max-content;margin-left: 20px;"> <input type="file" multiple class="slds-p-...


0

If this is a custom layout you have to add them manually. Refer here for more details, if still not visible refer this troubleshoot guide


1

This answer doesn't have much to do with Lightning App Builder -- it has more to do with D3 internals and understanding how to manage the value of the SVG's height attribute in LWC. For a working LWC + D3 starting point, I played around with the D3 example in lwc-recipes to see if I could get the component to adjust its height automatically. I was able to ...


3

You'll want to look at SLDS's Card Component or lightning-card. Using the built-in component would be ideal unless you have specific needs that are not met with that component.


0

Going just by the URL, I'd say you are missing a comma in the second last line: /lightning/o/Order/new?defaultFieldValues= Name={!URLENCODE(Opportunity.Name)}, OpportunityId={!Opportunity.Id}, ShipToContactId={!Opportunity.Primary_ContactId__c }, Customer_ContactId__c={!Opportunity.Primary_ContactId__c}, <======== HERE ========= Freight_Cost__c= {!...


2

If I understand you correctly, you have 2 objects, and the Lookup from the child to the parent is called Lookup_Field__c. If that is the case, an easy way to achieve what you are looking for would be to create a checkbox formula field in your child object Parent_Object_Protected_State__c that references the value you want to check (ISPICKVAL(...


1

You can do it with the help of getters which are reevaluated once an observable property changes. Please see the playground example here. Component: <template> <lightning-radio-group name="radioGroup" label="Radio Group" options={options} value={value} ...


0

You can use a custom lookup component for that, I used below component several times and it worked perfectly well for me. https://github.com/pozil/sfdc-ui-lookup-lwc


2

You need an AuraEnabled class that returns list of sObjects. And onclick or most probably onchange of your radio button should call that apex method so that you can use the response list as a picklist valueSet. @AuraEnabled(cacheable=true) public static Map<String, String> getSObjects() { Map<String, String> ...


1

Visualforce uses onload to load some stuff, so adding a handler here can cause problems. Instead: <script> function init() ... omitted ... function handleMessage() ... omitted ... window.addEventListener('DOMContentLoaded',init); </script> This final line will let your init method execute as soon as the page finishes loading. Note that ...


0

I have created a Generic lightning Component You can use this component. It's very fast and search for any keyword in any field in the data table. GenericTable.cmp <aura:component > <!-- Attrubutes Definations Start here --> <aura:attribute type="boolean" name="enableSearchonRow" description="...


0

As Charles T. on this post answered: Create a Lightning Component that implements lightning:isUrlAddressable and create a link button that navigates to that component's Lightning URL, passing enough parameters to have the info you need (record ID for example). This will show full-screen rather than as a modal. Also note that the component will ...


0

Found this sample code while referring to the following ideas https://success.salesforce.com/ideaView?id=0873A0000003VnmQAE https://success.salesforce.com/ideaView?id=0873A000000CSXWQA4 Unsure if this will help but you can try something like this ({ handleNewEngagement : function(component, event, helper) { let currentUrl = ...


Top 50 recent answers are included