• Bromer hemlost
  • 0 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
I tried to figure out if there is a way to set up Outlook LIghtning Sync such that Exchange can identify that client via a certificate.  I know it uses TLS but that verifies the server, not the client.  What I would like is a way to put a certificate in an org such that the Exchange server can then verify that the traffic came specifically from that org.
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
	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
            } else {
                console.log("Failed with state: " + state);
        // Send actions to be executed
    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!