We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [helper]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
39 views

Data from JSON is not display in my bar chart ? (Lightning component using chart.js)

Here what I am trying to achieve using chart.js in lightning component, Data comes properly from JSON but Not display like below image Here is my apex class method, @auraEnabled public static ...
0
votes
1answer
25 views

I want to display two different sucess message for two button in single lightning component

I have two button in same class one is Clone button,another is Renew button,now it is displaying only one sucess message for both button,but i want to display two different success message for two ...
-2
votes
1answer
53 views

Run Update Trigger only if a few fields are changed [closed]

I have Trigger and Trigger Helper. My trigger looks like that: if(Trigger.isAfter && Trigger.isUpdate) { TriggerHelper.updateTools(Trigger.old, Trigger.new); TriggerHelper....
0
votes
1answer
118 views

How does one populate a Lightning component combobox with a list of records (id/name)?

I have a Lightning component in which I want to display a list of records related to an Account. I currently have this (but it doesn't work): My Component display: <aura:if isTrue="{!not(empty(v....
-2
votes
1answer
26 views

Trigger after insert: can't update a record with no direct connection

I have this construction: If we create a Factory 2 with InDateTime__c = OutDateTime__c of the Tool 1 with the same Opportunity 1 (with another Factory 1 with the same Opportunity 1 relationship), ...
0
votes
1answer
42 views

Lightning components - Button to call a method from the helper?

I'm doing this Trailhead. Basically, the idea is to have one component that include a form, a button to submit the form, and a child component that display the list of items. I'm trying to improve ...
0
votes
1answer
73 views

How to call a method in a lightning component in same helper

I have a delay function in a lighting component helper from which I want to call another function I get the error [this.displayToast is not a function] how do I achieve this? Delay function: ...
0
votes
1answer
189 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
34 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
62 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
189 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
40 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
62 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
35 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
98 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
200 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
73 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
25 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
103 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
112 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
232 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
87 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 ...
2
votes
1answer
2k 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 ...
4
votes
1answer
1k 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
152 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
64 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
35 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
116 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
98 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
254 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
142 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
71 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
303 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
654 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
431 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
107 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
619 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
7k 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
4k 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
585 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....
19
votes
1answer
13k 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
364 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
181 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
955 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 ...