Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 2984

Client side controller principally used to delegate business logic which can be shared accros other controller methods.

5 votes
Accepted

Lightning Helper how to include js files?

c.setup}"/> <canvas aura:id="chart" id="myChart" width="400" height="400"/> Controller setup : function(component, event, helper) { var data = { labels: ["January", "February", "March"], …
sfdcfox's user avatar
  • 502k
4 votes
Accepted

Lightning updating 2 attributes when only 1 is updated

This is the nature of object oriented programming. An object holds a collection of values. However, the variable itself simply holds a reference to the object. This means that when you reuse the same …
sfdcfox's user avatar
  • 502k
3 votes
Accepted

Is it OK to have variables in a Lightning Component Helper

Don't store data in the helper. … this is an appropriate use of the helper. …
sfdcfox's user avatar
  • 502k
4 votes
Accepted

calling helper method from inner function in another helper function (same helper) in lightn...

Most likely, "this" inside your particular function refers to the FullCalendar module, or perhaps jQuery, but most certainly doesn't refer to the helper object. …
sfdcfox's user avatar
  • 502k
1 vote

Value is not getting populated in Number_of_Enrolments__c field

Relationship fields are not automatically populated in a trigger context. This means that: if(SE.Activity__r.Id != null) Will always be false. You need to check the lookup field directly: if(SE.Activ …
sfdcfox's user avatar
  • 502k
3 votes
Accepted

helper method is called recursively

When your helper is getting called recursively, it means you have a method name conflict between the client and server, which, in this case, appears to be getOpportunities. …
sfdcfox's user avatar
  • 502k
14 votes

How to call helper method from a different lightning component?

Option 1: Extend a Component You can extend an extensible component to share helper methods. … You need an instance of the component to call the helper. You cannot call it without first loading the component. …
sfdcfox's user avatar
  • 502k
3 votes
Accepted

How to get reference to Component from inside an event method

You'd want to make the following changes: // Helper function handleMessage: function (cmp, event) { console.log('handleMessage'); console.log(JSON.parse(JSON.stringify(event.data))); }, // Main … code onInit: function (cmp, event, helper) { window.addEventListener("message", $A.getCallback(helper.handleMessage.bind(helper, cmp))); }, …
sfdcfox's user avatar
  • 502k
2 votes

How to compare fields of oldMap and newMap?

As a matter of performance, you should use Trigger.old and Trigger.new instead of Trigger.oldMap and/or Trigger.newMap. You'll also get better performance by caching objects. Here's what a typical loo …
sfdcfox's user avatar
  • 502k
2 votes

Aura Lightning Component helper js file change doesn't reflect on client side

Lightning uses caching by default, so sometimes the browser takes a bit to catch up. To fix the problem, disable caching in Setup > Session Settings > Caching, and uncheck Enable secure and persistent …
sfdcfox's user avatar
  • 502k
1 vote
Accepted

Passing result from one helper function to another

response.getReturnValue()) } if (status === 'ERROR') { reject(response.getError()) } }) $A.enqueueAction(orgDom) }) }, rediRectToUrl(component, event, helper
sfdcfox's user avatar
  • 502k
0 votes

what is fourth item we are passing to js method?

The method is a helper method, which means the parameters are set by the component calling the method. … that has an attribute like: <aura:attribute name="searchEmail" type="Object" access="public" /> Which will then try to call the method as: component.get("v.searchEmail").onValueChange(component, event, helper
sfdcfox's user avatar
  • 502k
0 votes

Dynamic row values inherits the values from row before in lightning component

Each row refers to the same parent/child values. In fact, you've made this mistake all through your code. Each row should refer to an element in the list. <aura:iteration items="{!v.contactList}" var …
sfdcfox's user avatar
  • 502k
2 votes
Accepted

Error in $A.getCallback() [Cannot read property 'setParams' of undefined] Callback failed Wh...

Toasts are not supported outside of Lightning Experience, communities, and the mobile app. You will need to build your own toast component. The Lightning Strike library by Appiphony is one such exampl …
sfdcfox's user avatar
  • 502k
3 votes

Can I avoid a code duplication here?

The insertHandler method should be outside of the for loop entirely. Aside from that, I really don't see any point in trying to optimize your code. If you had a ton of different values, you might use …
sfdcfox's user avatar
  • 502k

15 30 50 per page