Questions tagged [callback]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

A parameter to an Aura Action is undefined. But not always. Why?

I have a particularly strange issue where one, and only one parameter to an Aura Action is undefined. Worse, it seems to be nondeterministic when it is undefined, and when it actually works. Relevant ...
0
votes
1answer
29 views

Custom validation message on Lightning Component

I am not able to show the custom validation error message based on my callback method in the helper class. Controller.js saveCase : function(component, event, helper){ var validTab4 = helper....
0
votes
0answers
65 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://...
3
votes
1answer
60 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 ...
1
vote
2answers
43 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 ...
0
votes
0answers
104 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 ...
0
votes
1answer
241 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 ...
6
votes
1answer
103 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 = ...
0
votes
1answer
1k 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:...
1
vote
1answer
278 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 ...
1
vote
1answer
63 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....
1
vote
2answers
46 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. ...
2
votes
2answers
46 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> ...
2
votes
1answer
1k 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 ...
3
votes
3answers
1k 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 = $...
0
votes
1answer
788 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 ...
1
vote
1answer
34 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 ...
0
votes
1answer
398 views

Hide button afterRender based on callback result

I'm trying to hide buttons depending on some information that the callback function on "INIT" should give as result. I'm trying to do it into a custom render "afterRender" as described in salesforce ...
3
votes
1answer
195 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 ...
2
votes
0answers
859 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/...
0
votes
0answers
41 views

Can not get token back from OAuth callback URL using CurrentPage.parameters

Can not get token back from OAuth callback URL using CurrentPage.parameters We have a connected app for which the callback URL is a visualforce page. https://myapp.na59.visual.force.com/apex/...
5
votes
1answer
812 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 ...
0
votes
1answer
318 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 ...
2
votes
1answer
6k 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 ...
0
votes
1answer
260 views

Updating the callback URL of a connected app ineffective

I have a connected app with an outdated callback URL. I need a refresh token, so I updated the callback URL. Even after one hour the change is still not effective. When I call https://login....
0
votes
0answers
341 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 ...
7
votes
3answers
322 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 ...
2
votes
1answer
596 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....
1
vote
1answer
72 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, ...
1
vote
2answers
3k 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....
0
votes
3answers
503 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 ...
1
vote
1answer
26 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 ...
2
votes
1answer
120 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 ...
2
votes
1answer
944 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 ...
4
votes
2answers
8k 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 ...
1
vote
2answers
63 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 ...
0
votes
1answer
564 views

Lightning Component: Loading $Resource, then action function, then $Resource

I am working on a lightning component where I want to load resources then, an action function, then resources, then action function. I currently have the component set up like this: <ltng:require ...
2
votes
1answer
67 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 ...
0
votes
0answers
108 views

Callback on completion of AsyncApexJob

Is there a way to have Apex code execute when an asynchronous job finishes? I want to solve this problem without polling (which seems to be the dominant solution).