4

If you want to develop code, that will be shared with lwc components, create lwc service component. Commonly, js is loaded as a static resource for already existed 3-party js libraries, but if you don't have any options except grouping js code in static resource, your js code should follow the following rule: must explicitly attach library global to window ...


3

In your class updateCheck method is static. you can't invoke static method from an instance of the class in Apex. It should be invoked from a class: instead of updateCaseRecord uC = new updateCaseRecord(); uC.updateCheck(std); should be updateCaseRecord.updateCheck(newCase.Id); you don't need any standard controller, as for VF controller. I recommend ...


3

You shouldn't have to worry about this. In an if/elseif/else chain, only (and exactly) one of the branches will be executed for each record you loop over.


3

For force:refreshView to work, you need to wait until your apex class returns; before this, the changes haven't been committed to the database yet. We use setCallback to accomplish this task. ({ updateCaseClose_helper: function(c, e, h) { var action = c.get("c.updateCheck"); action.setParams({ caseId: c.get("v.recordId") }); action.setCallback(...


2

It's happening because you're using an alert. When you use an alert, this causes the focus to change from the input element to the alert dialog, and then when you dismiss the dialog, the input element again gains focus, so it calls the alert dialog... You should use console.log to output messages you'd like to see instead.


2

Why not target some other class which is not common in both for example in your aura:html tag you can put this <aura:html tag="style"> .cuf-publisherCancelButton{ display:none; } </aura:html>


2

In JavaScript, you can use the method String.prototype.includes, or String.prototype.match (or several others). String.contains is an Apex method (and Java, and other languages), but JavaScript does not have such a method. Alternatively, you can use a RegExp. includes if(result.getState() === 'SUCCESS' && resultApex.includes('Successfully')) { ...


2

There are couple of minor issues with the front end code Use track on the Object property to make it reactive. Initialize the object. Also be careful with the names of the property and the component. Do not capitalize your variable names. The below code works fine in my scratch org import { LightningElement, wire, track } from 'lwc'; import ...


1

Someone helped me on another forum. Just need to update the URL to something like this. https://www.salesforce.com/?pv0=123&pv1=1/1/2020&csv=1&exp=1&enc=UTF-8&isdtp=p1 So the URL used for Classic and the URL used for Lightning are not so different


1

In theory, you should be able to use the values stored in the filterList attribute. You just need a few minor adjustments: <lightning:select label="{!val.label}" value="{!val.selectedValue}"><!--GET FROM CUSTOM LABEL--> And: <lightning:input label="{!val.label}" value="{!val.selectedValue}"/> By binding "value" to val, the iterator, ...


1

There are two scenarios Communicate with External Frameworks from Lightning: This is very much possible and can easily be achieved by using a lightning-container Lightning-container is a dependency that should be installed npm install lightning-container --save The installed module can be imported for use later import LCC from 'lightning-container'; ...


1

You missed a period to access the function. }).fire();


1

why not use min-column-width attribute where you can set the minimum column width for the table and you will get the scroller along x-axis which you can use to scroll through rest of the columns <lightning-datatable key-field="id" data={data} columns={columns} min-column-width="100" ...


1

You should implement lightningQuickActionWithoutHeader to hide the cancel button Example: <aura:component description="FileUploadPopUp" implements="force:lightningQuickActionWithoutHeader, force:hasRecordId"> <header class="slds-modal__header"> <h2 class="slds-modal__title slds-hyphenate">Modal Header</h2> </header&...


1

Why are you referencing your updateOwnership js method like this ? <lightning:button variant="brand" label="Take Ownership" onclick="{!comp.updateOwnership}" /> normally js method should be referenced c.updateOwnership. Therefore, I think this is not the origin of your issue. don't you have any other workflow, process builder or trigger firing ...


1

Controller methods are always referred to with c, not any other value. <lightning:button variant="brand" label="Take Ownership" onclick="{!cf.updateOwnership}" /> ... var set_action = comp.get("c.updateOwner"); If this doesn't fix it, there's something else wrong with your code, but I don't see it. You may have a copy-paste error or something else....


1

Modify the helper to pass the parameter from JS to Apex. Helper: ({ updateCaseClose_helper : function(c,e,h) { var save_action = c.get("c.updateCheck"); save_action.setParams({ caseId: c.get('v.recordId') }); save_action.setCallback(this, function(response) { $A.get("e.force:refreshView").fire(); }); $A.enqueueAction(...


1

force:showToast requires the Lightning Experience, a Community, or the Salesforce app. It is not supported in Lightning Apps, Lightning Out, or Visualforce. Since you have code contained in a <aura:application>, the event can be fired, but there's nobody listening, so it does nothing. You'd have to implement your own toast library to handle ...


Only top voted, non community-wiki answers of a minimum length are eligible