Questions tagged [callback]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
2 answers
987 views

When LWC that is used in Flow Screen is destroyed?

I need to detect when the LWC is destroyed, so far I haven't noticed that a disconnectedCallback has ever triggered on the LWC that is used in Screen on Flow. This creates a lot of problems because I ...
Rechu's user avatar
  • 452
7 votes
3 answers
430 views

Is there a clever abstraction to convert Lightning Component action responses to promises?

Coming from Angular and Ember, where making Ajax requests resulted in a Promise, I find it a little disappointing and frustrating that SFDC wants me to get back into callback hell by setting callbacks ...
Brian Kessler's user avatar
6 votes
1 answer
292 views

Help Interpret Peculiar Way of Handling SUCCESS and ERROR in Lightning Callback

I didn't write but rather I'm reviewing the following Lightning JS function: InitializeComponent : function (component) { var recId = component.get("v.recordId"); var action = ...
Gabriel Rivera's user avatar
6 votes
0 answers
196 views

Connected App In Managed Package with Different Call-back URLs

We are working on an composite AppExchange Application. Which uses connected app to connect to Salesforce from the composite (external) App. As the composite (external) app has different call-back ...
Ashish's user avatar
  • 2,372
5 votes
1 answer
1k views

Is there an event to handle Successful creation of record when event force:createRecord is used

I am creating custom object records using standard salesforce record creation feature by firing the event force:createRecord from my custom component. After saving the record, Page navigates to ...
Sriram's user avatar
  • 701
4 votes
2 answers
10k views

ui:inputSelect -> select value dynamically

I have a list of options, with a hardcoded standard message option (disabled), which will show if there is nothing selected. Upon clicking the list, you can manually select any option that is not the ...
Diamundo's user avatar
  • 269
3 votes
1 answer
916 views

Apex called from Aura omits null elements from response

It seems like collection types returned from the Apex to an Aura component omit null elements. I noticed this when I was passing a List of Strings back from Apex. I was failing to get the second ...
iwhitt567's user avatar
  • 440
3 votes
2 answers
488 views

I have two helper functions that are the exact same, one executes and one doesn't. How come?

So I have many of these, 10 to be exact and three won't execute, they are all the exact same and I feel I have been going around in circles for hours. I have noticed that if an apex method ends with ...
Tyler's user avatar
  • 91
3 votes
1 answer
5k views

LWC pass callback function dynamically

I have a modal component where I am passing in two-button handler methods which are callbacks. These two buttons are hooked up to a getter with the intent that I can override them, which I am having ...
SBB's user avatar
  • 173
3 votes
1 answer
347 views

When and why do I need to perform an .isValid() check?

This document - Modifying Components Outside the Framework Lifecycle - says the following: You don't need a cmp.isValid() check within this setTimeout() call as the cmp.set() call doesn't do ...
Eduard's user avatar
  • 5,129
3 votes
1 answer
326 views

How can I decompose a Lightning Component Helper to escape deep nesting hell?

I'm trying to figure out more maintainable ways of composing Lightning components. I'm currently looking at the helper on Display Weather Alerts in Lightning Experience, trying to break it down into ...
Brian Kessler's user avatar
3 votes
3 answers
3k views

Can we reload screen after Save from force:editRecord event?

I've a Custom Lightning Component displaying a List custom object records. On each data row, I've custom button to Edit the record. On Edit click, I've fired following event: var editRecordEvent = $...
VarunC's user avatar
  • 5,950
2 votes
2 answers
288 views

Clarifying Refactor Lesson

To be very clear, this is not looking for a solution to a trailhead but the code does come from the lesson walk through where the writer does not give an explanation of why his refactor works. The ...
thinker's user avatar
  • 1,432
2 votes
1 answer
10k views

How to send List<Wrapper class> from Lightning component to Apex Controller?

My question is bit similar to this. But I'm getting a Runtime exception in SF. Not getting a compiler error, but in Apex, it's throwing, FATAL_ERROR System.UnexpectedException: Salesforce System ...
Pasan Eeriyagama's user avatar
2 votes
1 answer
752 views

The response from the backend takes too long

After performing the $A.enqueueAction(anAction); the response provided with anAction.setCallback(this, aCallback); takes too long to execute (I should wait for something like 1-5 minutes after $A....
manymanymore's user avatar
2 votes
1 answer
1k views

Javascript remoting call back function placement

So I am new to js remoting and callback functions. I was trying to implement js remoting example from salesforce doc which worked. However on trying to tweak the callback, I am unable to get any ...
starhunter's user avatar
2 votes
1 answer
2k views

Dynamically set Connected App Callback URL

I am trying to dynamically update the callback url in a connected app. When creating a sandbox, I want to run an apex class that change the callback URL from a production to UAT callback endpoint. ...
S.B.'s user avatar
  • 2,071
2 votes
2 answers
1k views

DML operations in the Apex callback method

An apex method that returns a continuation object can’t perform DML. The solution given by the Salesforce developer documentation is the “perform DML operations in the Apex callback method”. https://...
R_Cham's user avatar
  • 49
2 votes
2 answers
120 views

HTML Button not calling Apex Controller

I am trying to call a controller function from a regular html button. However, I am having a hard time getting access the the controller. I have this: <button id="btn">My Button</button> ...
Fraser Orr's user avatar
2 votes
1 answer
4k views

Creating Generic Related List Lightning Component

I am trying to create a simple, reusable component that allows me to list related records in an easy to read way. I want to be able to use this component a few times on a single record, and I would ...
Chance's user avatar
  • 1,070
2 votes
1 answer
920 views

file upload in lightning do not call action callback

I am having the issue that at times when inserting a document from lightning component, the callback is not executing. At times it executes when on chrome, and at time not when on IE. I don't know why....
vanessen's user avatar
  • 2,655
2 votes
0 answers
150 views

How to prevent unmounting of component when using errorCallback lifecycle method in LWC

I am having an root LWC component and nested inner child LWC components structured like below for example. <c-application> <c-header></c-header> <c-form-container> <...
AdityaHM's user avatar
  • 133
2 votes
0 answers
1k views

Callback on "e.force:editRecord" Lightning Event

I have a page listing Cases with an edit button assigned to each one - the edit button fires a standard e.force:editRecord event, passing the recordId per button. Is there a way I can run a function/...
Thomas McFarlane's user avatar
2 votes
1 answer
383 views

Adding custom variable for callback url in packaged Connected App (Canvas)

how can we add additional parameters to callback so that we can determine the SF org which is calling the our server. We were to do this for Canvas url via Adding Custom Setting (List) and adding ...
Ashish Gaonker's user avatar
2 votes
1 answer
117 views

Salesforce to Boomi callback

We are doing a test path setup between sanbox boomi environment. In one of our process we had to test callback by initiating the call.But being new to this org I have no idea how to and where to check ...
Suresh's user avatar
  • 975
1 vote
2 answers
5k views

lightning callback not firing

Having in issue on my program running the setCallback. I have this one below which is working 100%: .js alert("Saving Comments!"); var saveCommentsAction = component.get("c....
MrD's user avatar
  • 35
1 vote
1 answer
1k views

Apex Paramater always null

I have an Apex method createRecurringEngagements that accepts a Boolean parameter jewishEducator (the last param). I print the parameter in the Apex class but it is always null. I tried accepting ...
tom_12321's user avatar
  • 191
1 vote
1 answer
1k views

Handle response value in UI from Callback function in LWC

I am trying to show the returned response value from a callback function in the below LWC code. But nothing is printed. Could you please help me out how to achieve this. Below is the code. <...
Somnath Paul's user avatar
1 vote
1 answer
3k views

Callback after the record was created using e.force:createRecord

Are there a way to add callback after the user created a record and clicked the Save button? I am using a custom tab and custom components and open the Create a record modal window using e.force:...
iloveseven's user avatar
  • 1,115
1 vote
2 answers
79 views

Change the code to reduce callback

Below is the functionality my code achieves currently Get the customer site . If customer site exists then check if latitude and longitude exist and if all is true then open the Locator with given ...
user5129806's user avatar
1 vote
1 answer
644 views

errorCallback not catching exception in child when thrown in apex call promise

I have a web component (lwc) with a child component that makes an imperative server call. When an exception is thrown by the server the parent component is not catching it in the errorCallback. The ...
Daniel Collier's user avatar
1 vote
1 answer
141 views

Upload File Error

I've used the followed example to upload files in my app: http://peterknolle.com/file-upload-lightning-component/ At the Helper upload method, I've found the '$A.run' and it's not working anymore, ...
Bruno Perdigão's user avatar
1 vote
1 answer
55 views

Can we use package push upgrade functionality to push new callback url in the list each time

We have domain like *.example.com . Each of our customer have domains like client1.example.com client2.example.com Hence the callabck url in out connencted app needs to be added with new url ...
Ashish Gaonker's user avatar
1 vote
1 answer
176 views

ChartJS Axes Callbacks not able to be passed from Parent to Child component

I am using ChartJS to display numerical values and I am looking to modify the Axes labels to display with commas. I want to do so by having the chart config look like: var xyValues = [ {x:50, y:7},...
Blake's user avatar
  • 131
1 vote
0 answers
149 views

Open CTI Callback issue in Managed package

I am facing this issue that my Open CTI method callbacks are not executing in an org where I have installed managed package. They work absolutely fine on the org where I developed my application as ...
Badar's user avatar
  • 45
1 vote
2 answers
2k views

How to incorporate Consumer id and consumer secret in my REST API (Apex class)

I have a requirement where some external web forms would be calling our REST API to submit Lead. I have created a connected app, got the consumer id and consumer secret. I want my apex class to be ...
Student's user avatar
  • 565
1 vote
0 answers
299 views

Lightning:recordForm onSuccess event not returning response

I'm trying to get the response in the onSuccess callback for a lightning:recordForm save event, but it's coming up as undefined. The callback is being called, I can log to the console, but both of the ...
hgolov's user avatar
  • 773
1 vote
2 answers
265 views

callback in helper for multiple methods

I am trying to display a form with dropdown values; one dependent on the other. They work fine independently. But when I put them together with the callback, I do not get any values. Please assist. ...
Priya's user avatar
  • 105
1 vote
1 answer
376 views

How to pass var to callback?

a today, i´m learning lightning, and i block with asyncronous callback. To practice, i did a small helper with apex call and a callback, but when a update a var out of callback, the value in callback ...
Carlos Sabado's user avatar
1 vote
0 answers
763 views

Not Able to receive Request Access Token from Connected Apps

I tried this Connected App setting but inside my codes I'm receiving null value for my Request Access Token in the codes. Can someone help me check whats the problem? I'm Testing the code using the ...
Luke Au's user avatar
  • 179
0 votes
1 answer
407 views

Restaurant Locator Trailhead Project Lightning Error

I am new to Lightning Components. When i try to finish a trailhead challenge called Build a Restaurant component Bascially it show Restaurants near to opportunity billing address and in controller ...
Pavan tej's user avatar
  • 1,460
0 votes
1 answer
437 views

API integration with desktop application

I am developing a desktop application that uses API to read data from salesforce I understand I need to authenticate it first. But when I read for some long time to do this, I found out I need to ...
Abraham's user avatar
  • 103
0 votes
2 answers
1k views

Handling Apex errors from the setCallBack function

Is there any better way to handle errors that comeback from the setCallBack function for Apex calls in Aura components? Maybe a better way to get rid of some of the elses I have in in my logic? ...
626's user avatar
  • 273
0 votes
1 answer
1k views

helper function undefined in helper after callback

In my helper function, I have two functions that are called: first one validates data that's in another component using an API,shipmentInfo.handleIsValid. After it returns the desired result, I get ...
Tyler Zika's user avatar
  • 2,882
0 votes
1 answer
2k views

Using Callback when calling server side function

I load some values using <aura:handler name="init" value="{!this}" action="{!c.loadOptions}" /> in my component. I want these values to be populated when my component is loaded. Basically it is ...
SfdcBat's user avatar
  • 4,791
0 votes
3 answers
1k views

Simple Aura Component for creating new records not working

I'm learning Lightning and in the process I'm creating a simple component that would take Name and Description of an Account and insert the same into the database and would also give a Success Message ...
Sagnik's user avatar
  • 605
0 votes
2 answers
412 views

record page LDS not being refreshed after apex call-back

We're working on a custom datatable inside a quote recordpage. Such datatable, shows a list of QuoteLineItems that the user can insert/update/delete from the component itself. Now, since we made the ...
Livio Cioffarelli's user avatar
0 votes
1 answer
123 views

$A.getCallback() [Cannot read property 'setParams' of null]

I'm using strophe.js for a pub/sub model that I want to implement in my aura component.However when the callback is triggered and I want to fire the component it gives an error setParams null. Since ...
Adam's user avatar
  • 1
0 votes
1 answer
584 views

Is it Possible to Apply the panelOnDestroyCallback Callback Parameter to the force:editRecord Event by Updating the $A Namespace?

Is it possible to update a copy of the $A namespace object to handle callbacks where they are not otherwise handled? For example, the force:createRecord event has the panelOnDestroyCallback callback ...
Renzo J.'s user avatar
0 votes
1 answer
240 views

Using landing page to receive data from a callback

I am using MC Event notification Service and I created a callback (using a 3rd party site) to receive data posted back from Marketing Cloud. I want to see if I can utilize a landing page to receive ...
rajpc's user avatar
  • 49