Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [helper]

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

-1
votes
0answers
8 views

Downloading Database from Heroku [closed]

I have a “free” app running on Heroku and can’t do anything with it because my rails developer has retired and refuses to work on the web at all. I need to find someone who can download the database ...
0
votes
1answer
53 views

Apex trigger helper class - deployment error “variable does not exist”

I'm trying to deploy an apex trigger from sandbox to production. But when I test/validate in production I'm getting the error "variable does not exist" for the trigger's helper class: Trigger '...
0
votes
1answer
26 views

Helper Uncaught Error

I'm getting this error Object.verify_trigger_proccess()@https://[COMPANY].lightning.force.com/lightning/r/Account/[ID]/components/c/event_layout.js:79:24 Object.eval()@https://[COMPANY].lightning....
3
votes
1answer
38 views

Helper method not calling other helper method

I'm trying to break logic into a few separate chunks, but hitting a snag. The basic structure of my helper looks like: ({ foo: function (component) { console.log(this.bar); // <-- ...
0
votes
2answers
49 views

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

I have a lightning component where in I have a few text fields and 2 picklist fields, controlling and dependent. The problem is whenever I try to add a new row dynamically, the new row will take the ...
0
votes
1answer
32 views

Call a helper function from within another helper function not working

I am trying to call a helper function from within another helper function, I read on this post that using this from within the helper function should grab the context of the object and I should be ...
1
vote
1answer
40 views

How to get reference to Component from inside an event method

I have a JavaScript helper method which handles a message sent from a child iframe handleMessage: function (event) { console.log('handleMessage'); console.log(JSON.parse(JSON.stringify(event....
0
votes
0answers
30 views

Lightning Button which Resets the form (uncaught action)

I am currently working on a lightning component which takes the input from a user and let them submit or reset it. Upon submission, the data is fed to an external system and get the results of the ...
0
votes
2answers
58 views

Restrict overlapping dates of Opportunities with Trigger

I have an Account and Opportunities for it. These Opportunities have time intervals: Start Date and Close Date. I want to prohibit the creation of Opportunities whose intervals overlap with the ...
0
votes
0answers
45 views

I am trying to resize my duallist box with help of size option in lightning and it is not working

The size is not resizing the width of the list. Not working as given in the specification. https://developer.salesforce.com/docs/component-library/bundle/lightning:dualListbox/example
0
votes
1answer
32 views

Access Object in Apex Class / Method after passing it from Controller

I (seemed to) have sucessfully passed an object from the client side helper controller into the apex method. However i am having trouble accessing using the dot notation i am used to in javascript and ...
0
votes
1answer
23 views

Map<String,wrapper> returned from apex class, not received by the helper controller!

I am returning a map value from the apex controller, but the helper controller doesn't receive anything data. Here the system.debug outputs the right values to be received by the controller. Plz ...
1
vote
1answer
67 views

Bulk upload in Lightning Component not working

we have a requirement where we need to upload contacts in bulk from lightning. We have set the maximum limit to 75k. But when we upload csv, it is considering a file of only 200-300. We need to upload ...
0
votes
1answer
59 views

Reference a controller function for a dynamically created DOM element

In my helper, I have a function that is dynamically creating multiple . I want the onclick event to trigger a controller function : I tried the following code : accordionWholeDiv.setAttribute('...
1
vote
0answers
164 views

showToast is not working in iOS device

Here what i have written code to display 'showToast' message in lightning component and It's not working in iOS (but yes it working as expected in Android and Web). handleFpAdd: function (component, ...
0
votes
1answer
43 views

Calling the trigger by class Method

I write a trigger on case for avoiding duplicate case by updating case status to "Duplicate". This Duplicate is manually inserted in picklist. I have to write Helper & Test class for this. Class ...
1
vote
1answer
1k views

How to call helper method from a different lightning component? [closed]

I have lightning component A and lightning component B, in lightning component B there is a helper method X, how to call helper method X in lightning component B from the helper in lightning component ...
0
votes
0answers
24 views

How can I create generic helper methods that can be used accross multiple components? [duplicate]

I want to create a function that can be used across lightning components.
3
votes
1answer
463 views

Dynamic Button Icons in a Data Table Similar to Dynamic Actions in a Data Table

It's possible to have actions for each row in a data table that change depending on the contents of the rows (that are changed by those very actions). For example: The component reference provides ...
1
vote
1answer
98 views

Lightning Application Event Seems to Refuse to Fire

Event: <aura:event type="APPLICATION" description="Event is fired when boat type is changed in the BoatSearchForm component" > <aura:attribute name="boatTypeId" type="String"...
3
votes
1answer
46 views

Lightning updating 2 attributes when only 1 is updated

I have a lightning component that has 2 attributes and in input. <aura:attribute name="wrapperObj" type="Object" /> <aura:attribute name="originalWrapperObj" type="Object" /> <input ...
1
vote
1answer
39 views

Passing an object parameter, containing employee enroll form on a Helper to Apex method in lightning

Currently, sending a Employee enroll input form on a object H_HRBasic__c to the apex class method CMP <aura:attribute name="HRB_S" type="H_HRBasic__c" default="{'sobjectType':'H_HRBasic__c', ...
0
votes
1answer
30 views

How can I test Messaging.MassEmailMessage with checking targetobjectids?

We have some User with UserRole. I need to verify that the email has been sent to the user with the role 'TestRole'. How can I do that? I try: List<Messaging.MassEmailMessage.targetobjectids> ...
-3
votes
1answer
55 views

Test class with different scenarios for trigger helper

I have 100% coverage, but I still haven't scenarios for check. How to write good and bad scenarios for test class? This is my helper: public with sharing class JobHelper { public static List<...
0
votes
2answers
33 views

Can I avoid a code duplication here?

I have a code duplication here. How can I fix it? I want to make my code better. Helper: public with sharing class JobHelper { List<Task> taskList = new List<Task>(); public void ...
0
votes
1answer
62 views

How to make more methods in Trigger Helper class?

How can I make more methods in this Helper class, not just public static void? I also need a method for checking the update of Stage__c field (when we update another fields - Trigger shouldn't be ...
1
vote
1answer
180 views

helper method is called recursively

I'm trying to fetch the list of opportunities related to the account(called as Student in my case) selected(from dropdown list). I have 2 buttons with different aura:ids what I want is, when I click ...
0
votes
1answer
38 views

How to merge these two map into one map?

Set<ID> folderIDS = new Set<ID>(); Map<ID,Custom_Folder__c> foldersToUpdate1 = new Map<ID,Custom_Folder__c>(); Map<ID,Custom_Folder__c> foldersToUpdate2 = new Map<ID,...
1
vote
2answers
133 views

Show checkbox while loading component

I have used Check all / Uncheck All checkboxes function to select group of Values. I used to display some data in aura iteration with checkbox values checked. If the data row is more than one its ...
0
votes
1answer
62 views

triggers and helper class to update quoteline items from account

trigger ct on Account (after insert, after update, before insert, before update) { Set<Id> accIds = new Set<Id>(); Set<id> oppIds = new Set<id>(); for(...
3
votes
0answers
197 views

Global window object in lightning helper

After getting an answer to Preserve a JavaScript variable between component calls of the client-side code question (which says there is a separate wrapper object around the browser's window object for ...
1
vote
2answers
446 views

Client side logic that is executed when a user hovers over an Account in the list should be stored in which bundle member?

While preparing myself to the Developer 1 certification I met the following question: A developer created a lightning component named accountList.cmp that displays a list of Accounts. Client side ...
0
votes
0answers
314 views

$A.createcomponent not working as expected

I'm creating a component that, based on a custom fieldset, generates a form. The point is when is trying to create lightning:select, lightning:duallistbox and lightning:textarea the $A.createComponent ...
0
votes
1answer
87 views

How to set attribute.Metadata field in .callServer with Javascript Var?

I tried to get the description of the title correct. If you think there might be a better one that describes better the scenario, please suggest! In lightning components, I have a cpq_Configure ...
4
votes
1answer
473 views

Helper Method undefined when called from dynamically created component

Using examples from the developer documentation Dynamically Creating Components, I am attempting to create a button dynamically (which I should be able to select in order to create a new component ...
0
votes
2answers
4k views

Check if certain string exist in my enum values - salesforce

In My ENUM a list of values is added and I need to check if certain string values are in my ENUM and which is dynamically checked through a loop. public Enum KeyValues{CaseNumber, Name, OwnerId, Id} ...
0
votes
1answer
3k views

JSON parsing and aura iteration in salesforce Lightning

Below is the link of format JSON example I am trying to bind the data which is there in results-> items using aura:iteration. Here is my code for that. <aura:iteration items="{!v.newassets....
2
votes
1answer
3k views

Can I do multiple functions in one Lightning Component Controller?

I have tried to put multiple functions into the one Component Controller unsuccessfully. I then created a helper class that the Component Controller calls and will run the different methods. This was ...
4
votes
1answer
464 views

Packaging custom labels used in lightning helpers and controllers

So in our lightning code base we usually refer to labels from js helpers and controllers as the following (it's static reference, not dynamic one): $A.get("$Label.c....
16
votes
1answer
11k views

Help me to undestand this lightning helper methods (reduce & showHelpMessageIfInvalid)?

I went through the lightning guide and try to learn the form controls, I got the below code which show that it validates the form fields, But would like to see more insight on 1 reduce - what this ...
1
vote
1answer
313 views

Get component in helper class from current context in Lightning

As we all know helper methods in Lightning usually have the following signature: openAffiliationCreateDialog : function(component, event) { ... } My question here, is it possible to stop passing ...
1
vote
2answers
3k views

Adding onclick to dynamically created button

I have a component that dynamically creates buttons which, when clicked, apply filters and then re-query the back end for data. While I can assign onclick events to each button, I can't find a way to ...
2
votes
1answer
2k views

calling helper method from inner function in another helper function (same helper) in lightning component

I have this code in component helper: func1:function (component){ var element = component.find("calendar").getElement(); $(element).fullCalendar({ views: { ...
2
votes
1answer
175 views

Salesforce Simple Syntax Error

I am working on a very basic lightning App that will return (for cases) a list of cases that have the same contactId associated with them. I'm following this trailhead as an example and modifying for ...
6
votes
2answers
840 views

Is it OK to have variables in a Lightning Component Helper

I'm working on a drag + drop application in Lightning. I've worked up my solution by having a wrapper component, FormDraggableElement, which goes around anything that I want to be able to drag around ...
0
votes
1answer
274 views

How to assign salesforce value to standard lightning component

How to show Salesforce data into a dynamically created standard component. I'm dynamically creating ui:inputText field which is used to display Custom Object value in UI. How can I display field value ...
0
votes
1answer
441 views

Need to change Value on every value change in lightning component

HI I Want to Change Result(Servicevalibility) value as soon as there is any change in Input Fields.But,Now its changing only when i change the value and press tab key . Component - ...
0
votes
0answers
389 views

Trigger to update all the Child records in the hierarchy based on parent record

I have a Cusotm object which is used to save assets. There is a Self lookup relationship field called "Parent Asset ID" on this object and using this relationship, we create a parent-child ...
3
votes
1answer
8k views

Use existing Lightning component in $A.createComponent

I wish to make dynamic aura:id's and for that i want to use $A.createComponent, now i already have a component called 'pageComponentCard' that i wish to call but i can't do this. The code in ...
3
votes
1answer
3k views

Helper method error: says is “Not a function”

I'm trying to implement a helper method in a Lightning component, but the error that comes up is: "This page has an error. You might just need to refresh it. Error during init [Action failed: c:...