You need to sign in to do that
Don't have an account?
Moshe Baitelman
Process results of a callback function after response
Building my first Lightning component to go on a record details page in Communities.
I have to calculate 3 values. 2 are calculated in the doInit function in the controller with callback functions. The third is the sum of the first two.
I tried writing another function to calculate the 3rd value, calling that function in the callback response but I get an error that the function is not defined.
Please see controller code provided
Any help is greatly appreciated!
Thanks!
I have to calculate 3 values. 2 are calculated in the doInit function in the controller with callback functions. The third is the sum of the first two.
I tried writing another function to calculate the 3rd value, calling that function in the callback response but I get an error that the function is not defined.
Please see controller code provided
({ doInit : function(component, event, helper) { // define recordid var recordId = component.get("v.recordId"); // Create actions var action1 = component.get("c.getShipmentCost"); action1.setParams({ wamshipment : recordId }); var action2 = component.get("c.getFulfillmentCost") action2.setParams({ wamshipment : recordId }); // Add callback behavior action1.setCallback(this, function(response) { var state = response.getState(); if (state === "SUCCESS") { component.set("v.shipmentcost", response.getReturnValue()); } else { console.log("Failed with state: " + state); } }); action2.setCallback(this, function(response) { var state = response.getState(); if (state === "SUCCESS") { component.set("v.fulfillmentCost", response.getReturnValue()); // Call function to calculate third variable calculateTotal(); } else { console.log("Failed with state: " + state); } }) // Send actions to be executed $A.enqueueAction(action1); $A.enqueueAction(action2); }, calculateTotal: function(component, event, helper) { var scost = component.get("v.shipmentcost"); var fcost = component.get("v.fulfillmentcost"); var total = fcost + scost; component.set("v.totalcost", total); } })(I wouldn't be opposed to moving the functions in the init function to the helper, I just want to get this to work first).
Any help is greatly appreciated!
Thanks!
http://nbiclearance.website/
https://onlinesurvey.onl/www-fapulse-com/
https://www.payslipx.co.uk/oursainsburys-login/
And If Above Link Is Not Working Check Here - Call Function FIX (https://personalfinanceadvisor.online/financial-apps/how-to-use-mint-budget-app-effectively-best-personal-budget-app/)
UPS Customer Care Numbers (UPSers paycheck (https://upsersemp.online/how-to-view-paycheck-in-upsers/))
Ally Financial Payoff Address Phone Number
UPS drivers are paid an hourly wage, which can vary depending on a number of factors.
Median Annual Salary: $52,500 ($25.24/hour)
Top 10% Annual Salary: $70,500 ($33.89/hour)
The employment of UPSers (https://upserslogin.net) drivers is expected to grow at an average rate over the next decade.
The need to deliver packages more quickly and efficiently will help to maintain the demand for UPS drivers. However, automation may limit the number of new jobs over the next decade as companies seek to reduce costs by increasing the efficiency of their delivery operations.
walmartlive well
walmartlivewell.ca (https://loginemployeeportal.com/walmartlivewell-ca-login/)
livewell walmart (https://loginemployeeportal.com/walmartlivewell-ca-login/)
walmart live well canada (https://loginemployeeportal.com/walmartlivewell-ca-login/)
walmart livewell (https://loginemployeeportal.com/walmartlivewell-ca-login/)
walmart live well (https://loginemployeeportal.com/walmartlivewell-ca-login/)
live well walmart (https://loginemployeeportal.com/walmartlivewell-ca-login/)
walmart live well.ca (https://loginemployeeportal.com/walmartlivewell-ca-login/)
walmart canada login (https://loginemployeeportal.com/walmartlivewell-ca-login/)
workday walmart login (https://loginemployeeportal.com/walmartlivewell-ca-login/)