• Bernice Botes
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hi fellow Trailblazers,  

I'm a novice salesforce developer and wasn't sure if it was even possible to schedule a batch SOAP call. I discovere another thread where someone needed help with the test case of his classes, but didn't explain his approach to the actual implementation. I have implemented my four classes and when I make the call, it seems to schedule it but I don't think that it is actually every executing the code. And in my logs I just get a Problem: This schedulable class has jobs pending or in progress. 
I have an apex class in which I do my SOAP Api callout. Then I have a class in which I do a batch processing. And a schedule class in which I schedule the actual callout. 
The scheduler calls the batch who in return calls the batch who then calls the web service class. 
See code below.
If anyone could just be so kind as too point out any obviouse salesforce rooky mistakes I might be making it would be much appreciated.

//SOAP apex class
 
global with sharing class FmeSOAPCallout{
    global static ElephantService.Service1Soap service = newElephantService.Service1Soap();
     
    webservice static String getObject(String CompanyID, String lmTime, Stringtz){
        String webResult = service.SkyQMobileUnits(CompanyID, lmTime, tz);
        return webResult;
    }
     
}
global class FmeBatchSOAP implements Database.Batchable<sObject>,
Database.AllowsCallouts{
    
    global Integer recordsProcessed = 0;
    
    global FmeBatchSOAP(){}
    
    global Database.QueryLocator start(Database.BatchableContext info){
        return Database.getQueryLocator('SELECT Id, Name, TrackerObject_Timestamp__c '+
                                       'FROM TrackerObject__c');
    }


   global void execute(Database.BatchableContext bc, List<sObject> scope){
       try{
           String results = FmeSOAPCallout.getObject('1091', '0', '120');
           FmeProcessSOAPCall.processSOAPCallout(results);            
       }catch(Exception ex){
           System.debug('FmeBatchSOAP' + ex.getLineNumber() + ex.getMessage()+ ex.getStackTraceString());
           System.abortJob(bc.getJobId());
       }
   }

   global void finish(Database.BatchableContext bc){
       System.debug(recordsProcessed + 'records processed');
       AsyncApexJob job = [SELECT Id, Status, NumberOfErrors, 
                           JobItemsProcessed, 
                          TotalJobItems
                          FROM AsyncApexJob
                          Where Id = :bc.getJobId()];
	System.debug(job);
   }
}
 
global class FmeScheduleSOAP implements Schedulable {

    global void execute(SchedulableContext SC){
		FmeBatchSOAP batch = new FmeBatchSOAP();
		Database.executeBatch(batch);
    }

}

 

Good morning everyone,

I am a novice at Salesforce, so please bare with me. I know that this question has been asked before. However none of the previouse users seem to have a map included in there component so I am wondering if the map is what is causing my problem.
Here is my scenerio:
I have a leaflet map with pins on it. When the user has clicked on the map two times, saving two sets of coordinates into the custom objects fields, it opens a new component in which the user now has the ability to name this new path. I am using events to trigger update of the object.
Solutions I've played with.
When I use a normal <input> I am able to complete the action of typing in the name however the name is not being saved to the customObject. But when I use the <ui:inputText> the moment I press the field I get the "sorry to interrupt error" in the stack trace it reference the leaflet resources. I think this can't be a problem as other people are also getting same error. 
Having no event and simply passing the values between the components by means of attributes 

If you could just point me in the right direction, it would be much appreciated. 

//Map component
<aura:component >
    <aura:attribute name="map" type="object"/>
    <aura:attribute name="addPath" type="boolean" default="false"/>
    <aura:attribute name="newPath" type="TrackerPath__c"
                    default="{'sObjectType':'TrackerPath__c',
                             'PathName__c': 'Path Name',
                             'TrackerPath_StartPoint__c':'',
                             'TrackerPath_EndPoint__c':''}" 
                    access="public"/>
    
    <aura:attribute name="startPoint" type="Object"/>
    <aura:attribute name="endPoint" type="Object"/>
    <aura:registerEvent name="fmeNewFormEvent" type="c:FmeNewPathEvent"/>
    <aura:handler event="c:FmeMapPinsEvent" action="{!c.fmeMapPinsEvent}"/>

    
    <ltng:require styles="/resource/leaflet/leaflet.css"
                   scripts="/resource/leaflet/leaflet.js"
                   afterScriptsLoaded="{!c.jsLoaded}"/>
    
    
<div id="map" style="height: -webkit-fill-available; width: -webkit-fil-available;">
        <c:FmePathForm newPath="{!v.newPath}" addPath="{!v.addPath}"/>
</div><!--End of MAP-->

</aura:component>
//mapcomponent controller
({
   jsLoaded: function(component, event, helper) {

      var map = L.map('map', {zoomControl: true}).setView([-25.781693, 28.277831], 14);
      L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
        {
              attribution: 'Tiles © Esri'
        }).addTo(map);
       component.set("v.map", map);
       var coordinates = new Array();
       map.on('click', function(e){
			//bind a new object to the array and display
           coordinates.push(e.latlng);
           helper.showCoordinates(map, e);
           
           //if there is two coordinates show form to add a new path
           if(!coordinates.isNaN && coordinates.length == 2){
               helper.setNewPath(component, coordinates, event);
               coordinates.length = 0;
               
           }
       });
  }, 
    
    fmeMapPinsEvent : function(component, event, helper){
        var map = component.get('v.map');
        var coordinates = event.getParam('coordinates');
        if(coordinates !== 'undefined'){

           for(var i = 0; i < coordinates.length; i++){
                var coordinate = coordinates[i];
               console.log('Pass: fmeMapPinsEvent\n' + 'coordinate:'+  coordinate);
                var latlng = ([coordinate.TrackerCoordinate_Location__Latitude__s, coordinate.TrackerCoordinate_Location__Longitude__s]);
               	var popupContent = '<form>'
                +'<div class="form-group" >'
                                       +'<h4 align="center">'+ "Elephant Details" + '<h4>'
                                        +'<h5>' + coordinate.Name +'<h5>'
                                    	+'<label><strong>' + "Id"+ '</strong></label>'
                                        +'<br/>'
                                        +'<p>'+coordinate.TrackerCoordinate_ObjectName__c+'</p>'
						                +'<label><strong>'+ "Coordinates"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>'+ coordinate.TrackerCoordinate_Location__Latitude__s + ' ; '+ coordinate.TrackerCoordinate_Location__Longitude__s+'</p>'
                                        +'<label><strong>' +"Address"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>' +coordinate.TrackerCoordinate_Address__c+'</p>'
                                        +'<label><strong>'+ "Time"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>'+coordinate.TrackerCoordinate_Timestamp__c+'</p>' 
                                   +'</div>'
                                +'</form>';
                L.marker(latlng, {coordinate: coordinate}).addTo(map).bindPopup(popupContent);
            }
        }
        else{
            console.log('Fail: fmeMapPinsEvent\n' + 'coordinates:'+  coordinates);
        }
    },
    
    closePopup : function(component, event, helper){
        component.set("v.addPath", false);
   	},
    
    Save: function(component, event, helper){
        var name = component.find("pathName");
        var value = name.get("v.value");
        console.log(name);
    },

})
//helper
({
    showCoordinates: function(map, e){
             var popup = L.popup().setLatLng(e.latlng).setContent('<div>' + e.latlng+ '</div>').openOn(map);
    },
    setNewPath: function(component, coordinates, event){
        component.set("v.newPath.TrackerPath_StartPoint__c", coordinates[0]);
        component.set("v.newPath.TrackerPath_EndPoint__c", coordinates[1]);
        component.set("v.newPath.PathName__c", "Path Name");
        component.set("v.addPath", true);
    }
})
//PathComponent
<aura:component controller="FmePathController">
<aura:attribute name="newPath" type="TrackerPath__c"
                    default="{'sObjectType':'TrackerPath__c',
                             'PathName__c': 'Path Name',
                             'TrackerPath_StartPoint__c':'',
                             'TrackerPath_EndPoint__c':''}" 
                    access="public"/>
    <aura:attribute name="addPath" type="Boolean" default="false"/>
    <aura:attribute name="saved" type="Boolean" default="false"/>
	
    <aura:handler event="c:FmeNewPathEvent" action="{!c.fmeNewPathEvent}"/>  
    
    <aura:if isTrue="{!v.addPath}">
    	<div role="dialog" tabindex="-1" aria-labelledby="header" class="slds-modal slds-fade-in-open">
        	<div class="slds-modal__container">
                <!--POPUP HEADER-->
            	<div class="slds-modal__header">
                    <button class="slds-button slds-modal__close slds-button--icon--inverse" title="Close" onclick="{!c.closePopup}">X
                        <span class="slds-assistive-text">Close</span>
                    </button>
					<h2 id="header" class="slds-text-heading--medium">Add new path</h2>
                </div>
                <!--/POPUP HEADER-->
                <!--POPUP BODY-->
                <div class="slds-modal__content slds-p-around--medium">
					<form class="slds-form--horizontal slds-form--stacked">
                        <div class="slds-form-element">
                           <span class="slds-form-element__label">Path Name</span>
                           <div class="slds-form-element__control slds-border">
                               <ui:inputText aura:id="name" label="Path Name"
                                             class="slds-input"
                                             labelClass="slds-form-element__label"
                                             value="{!v.newPath.PathName__c}"
                                             required="true" />    </div>
                        </div>
                        <div class="slds-form-element">
                            <span class="slds-form-element__label">StartPoint</span>
                            <div class="slds-form-element__control slds-border">
                                <input aura:id="startPoint" label="StartPoint"
                                       class="slds-input"
                                       labelClass="slds-form-element__label"
                                       value = "{!v.newPath.TrackerPath_StartPoint__c}"
                                       required="true"/>
                            </div>
                        </div>
                        <div class="slds-form-element">
                            <span class="slds-form-element__label">Destination Point</span>
                            <div class="slds-form-element__control slds-border">
                                <input aura:id="endPoint" label="Destination Point"
                                       class="slds-input"
                                       labelClass="slds-form-element__label"
                                       value = "{!v.newPath.TrackerPath_EndPoint__c}"
                                       required="true"/>
                            </div>
                        </div>
                    </form>
                </div>
                <!--/POPUP BODY-->
                <!--FOOTER-->
                <div class="slds-modal__footer">
                	<button class="slds-button slds-button--neutral" onclick="{!c.closePopup}">Cancel</button>
                    <button class="slds-button slds-button--brand" onclick="{!c.savePath}">Save</button>
                </div>
                <!--/FOOTER-->
            </div>
        </div>
    </aura:if>
    
<!--/EVENT HANDLERS-->
    <!--/VARIABLES/EVENTS-->
    
    <!--VISUAL CONTENT-->
    
    <!--/VISUAL CONTENT-->
</aura:component>

//controller
({
    fmeNewPathEvent: function(component, event, helper){
        console.log("doInit");
        var tempObject  = event.getParams("newPath");
        console.log(tempObject);
        component.set("v.newPath", tempObject);
        
    },
    closePopup : function(component, event, helper){
        component.set("v.addPath", false);
    },
    savePath : function(component, event, helper)
    {
        var name = component.find("pathName");
        var value = name.get("v.value");
        console.log(value);
        console.log(component.get("v.newPath"));
    }
      
})


 

 

 

Good morning everyone,

I am a novice at Salesforce, so please bare with me. I know that this question has been asked before. However none of the previouse users seem to have a map included in there component so I am wondering if the map is what is causing my problem.
Here is my scenerio:
I have a leaflet map with pins on it. When the user has clicked on the map two times, saving two sets of coordinates into the custom objects fields, it opens a new component in which the user now has the ability to name this new path. I am using events to trigger update of the object.
Solutions I've played with.
When I use a normal <input> I am able to complete the action of typing in the name however the name is not being saved to the customObject. But when I use the <ui:inputText> the moment I press the field I get the "sorry to interrupt error" in the stack trace it reference the leaflet resources. I think this can't be a problem as other people are also getting same error. 
Having no event and simply passing the values between the components by means of attributes 

If you could just point me in the right direction, it would be much appreciated. 

//Map component
<aura:component >
    <aura:attribute name="map" type="object"/>
    <aura:attribute name="addPath" type="boolean" default="false"/>
    <aura:attribute name="newPath" type="TrackerPath__c"
                    default="{'sObjectType':'TrackerPath__c',
                             'PathName__c': 'Path Name',
                             'TrackerPath_StartPoint__c':'',
                             'TrackerPath_EndPoint__c':''}" 
                    access="public"/>
    
    <aura:attribute name="startPoint" type="Object"/>
    <aura:attribute name="endPoint" type="Object"/>
    <aura:registerEvent name="fmeNewFormEvent" type="c:FmeNewPathEvent"/>
    <aura:handler event="c:FmeMapPinsEvent" action="{!c.fmeMapPinsEvent}"/>

    
    <ltng:require styles="/resource/leaflet/leaflet.css"
                   scripts="/resource/leaflet/leaflet.js"
                   afterScriptsLoaded="{!c.jsLoaded}"/>
    
    
<div id="map" style="height: -webkit-fill-available; width: -webkit-fil-available;">
        <c:FmePathForm newPath="{!v.newPath}" addPath="{!v.addPath}"/>
</div><!--End of MAP-->

</aura:component>
//mapcomponent controller
({
   jsLoaded: function(component, event, helper) {

      var map = L.map('map', {zoomControl: true}).setView([-25.781693, 28.277831], 14);
      L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
        {
              attribution: 'Tiles © Esri'
        }).addTo(map);
       component.set("v.map", map);
       var coordinates = new Array();
       map.on('click', function(e){
			//bind a new object to the array and display
           coordinates.push(e.latlng);
           helper.showCoordinates(map, e);
           
           //if there is two coordinates show form to add a new path
           if(!coordinates.isNaN && coordinates.length == 2){
               helper.setNewPath(component, coordinates, event);
               coordinates.length = 0;
               
           }
       });
  }, 
    
    fmeMapPinsEvent : function(component, event, helper){
        var map = component.get('v.map');
        var coordinates = event.getParam('coordinates');
        if(coordinates !== 'undefined'){

           for(var i = 0; i < coordinates.length; i++){
                var coordinate = coordinates[i];
               console.log('Pass: fmeMapPinsEvent\n' + 'coordinate:'+  coordinate);
                var latlng = ([coordinate.TrackerCoordinate_Location__Latitude__s, coordinate.TrackerCoordinate_Location__Longitude__s]);
               	var popupContent = '<form>'
                +'<div class="form-group" >'
                                       +'<h4 align="center">'+ "Elephant Details" + '<h4>'
                                        +'<h5>' + coordinate.Name +'<h5>'
                                    	+'<label><strong>' + "Id"+ '</strong></label>'
                                        +'<br/>'
                                        +'<p>'+coordinate.TrackerCoordinate_ObjectName__c+'</p>'
						                +'<label><strong>'+ "Coordinates"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>'+ coordinate.TrackerCoordinate_Location__Latitude__s + ' ; '+ coordinate.TrackerCoordinate_Location__Longitude__s+'</p>'
                                        +'<label><strong>' +"Address"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>' +coordinate.TrackerCoordinate_Address__c+'</p>'
                                        +'<label><strong>'+ "Time"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>'+coordinate.TrackerCoordinate_Timestamp__c+'</p>' 
                                   +'</div>'
                                +'</form>';
                L.marker(latlng, {coordinate: coordinate}).addTo(map).bindPopup(popupContent);
            }
        }
        else{
            console.log('Fail: fmeMapPinsEvent\n' + 'coordinates:'+  coordinates);
        }
    },
    
    closePopup : function(component, event, helper){
        component.set("v.addPath", false);
   	},
    
    Save: function(component, event, helper){
        var name = component.find("pathName");
        var value = name.get("v.value");
        console.log(name);
    },

})
//helper
({
    showCoordinates: function(map, e){
             var popup = L.popup().setLatLng(e.latlng).setContent('<div>' + e.latlng+ '</div>').openOn(map);
    },
    setNewPath: function(component, coordinates, event){
        component.set("v.newPath.TrackerPath_StartPoint__c", coordinates[0]);
        component.set("v.newPath.TrackerPath_EndPoint__c", coordinates[1]);
        component.set("v.newPath.PathName__c", "Path Name");
        component.set("v.addPath", true);
    }
})
//PathComponent
<aura:component controller="FmePathController">
<aura:attribute name="newPath" type="TrackerPath__c"
                    default="{'sObjectType':'TrackerPath__c',
                             'PathName__c': 'Path Name',
                             'TrackerPath_StartPoint__c':'',
                             'TrackerPath_EndPoint__c':''}" 
                    access="public"/>
    <aura:attribute name="addPath" type="Boolean" default="false"/>
    <aura:attribute name="saved" type="Boolean" default="false"/>
	
    <aura:handler event="c:FmeNewPathEvent" action="{!c.fmeNewPathEvent}"/>  
    
    <aura:if isTrue="{!v.addPath}">
    	<div role="dialog" tabindex="-1" aria-labelledby="header" class="slds-modal slds-fade-in-open">
        	<div class="slds-modal__container">
                <!--POPUP HEADER-->
            	<div class="slds-modal__header">
                    <button class="slds-button slds-modal__close slds-button--icon--inverse" title="Close" onclick="{!c.closePopup}">X
                        <span class="slds-assistive-text">Close</span>
                    </button>
					<h2 id="header" class="slds-text-heading--medium">Add new path</h2>
                </div>
                <!--/POPUP HEADER-->
                <!--POPUP BODY-->
                <div class="slds-modal__content slds-p-around--medium">
					<form class="slds-form--horizontal slds-form--stacked">
                        <div class="slds-form-element">
                           <span class="slds-form-element__label">Path Name</span>
                           <div class="slds-form-element__control slds-border">
                               <ui:inputText aura:id="name" label="Path Name"
                                             class="slds-input"
                                             labelClass="slds-form-element__label"
                                             value="{!v.newPath.PathName__c}"
                                             required="true" />    </div>
                        </div>
                        <div class="slds-form-element">
                            <span class="slds-form-element__label">StartPoint</span>
                            <div class="slds-form-element__control slds-border">
                                <input aura:id="startPoint" label="StartPoint"
                                       class="slds-input"
                                       labelClass="slds-form-element__label"
                                       value = "{!v.newPath.TrackerPath_StartPoint__c}"
                                       required="true"/>
                            </div>
                        </div>
                        <div class="slds-form-element">
                            <span class="slds-form-element__label">Destination Point</span>
                            <div class="slds-form-element__control slds-border">
                                <input aura:id="endPoint" label="Destination Point"
                                       class="slds-input"
                                       labelClass="slds-form-element__label"
                                       value = "{!v.newPath.TrackerPath_EndPoint__c}"
                                       required="true"/>
                            </div>
                        </div>
                    </form>
                </div>
                <!--/POPUP BODY-->
                <!--FOOTER-->
                <div class="slds-modal__footer">
                	<button class="slds-button slds-button--neutral" onclick="{!c.closePopup}">Cancel</button>
                    <button class="slds-button slds-button--brand" onclick="{!c.savePath}">Save</button>
                </div>
                <!--/FOOTER-->
            </div>
        </div>
    </aura:if>
    
<!--/EVENT HANDLERS-->
    <!--/VARIABLES/EVENTS-->
    
    <!--VISUAL CONTENT-->
    
    <!--/VISUAL CONTENT-->
</aura:component>

//controller
({
    fmeNewPathEvent: function(component, event, helper){
        console.log("doInit");
        var tempObject  = event.getParams("newPath");
        console.log(tempObject);
        component.set("v.newPath", tempObject);
        
    },
    closePopup : function(component, event, helper){
        component.set("v.addPath", false);
    },
    savePath : function(component, event, helper)
    {
        var name = component.find("pathName");
        var value = name.get("v.value");
        console.log(value);
        console.log(component.get("v.newPath"));
    }
      
})


 

 

 

Good morning everyone,

I am a novice at Salesforce, so please bare with me. I know that this question has been asked before. However none of the previouse users seem to have a map included in there component so I am wondering if the map is what is causing my problem.
Here is my scenerio:
I have a leaflet map with pins on it. When the user has clicked on the map two times, saving two sets of coordinates into the custom objects fields, it opens a new component in which the user now has the ability to name this new path. I am using events to trigger update of the object.
Solutions I've played with.
When I use a normal <input> I am able to complete the action of typing in the name however the name is not being saved to the customObject. But when I use the <ui:inputText> the moment I press the field I get the "sorry to interrupt error" in the stack trace it reference the leaflet resources. I think this can't be a problem as other people are also getting same error. 
Having no event and simply passing the values between the components by means of attributes 

If you could just point me in the right direction, it would be much appreciated. 

//Map component
<aura:component >
    <aura:attribute name="map" type="object"/>
    <aura:attribute name="addPath" type="boolean" default="false"/>
    <aura:attribute name="newPath" type="TrackerPath__c"
                    default="{'sObjectType':'TrackerPath__c',
                             'PathName__c': 'Path Name',
                             'TrackerPath_StartPoint__c':'',
                             'TrackerPath_EndPoint__c':''}" 
                    access="public"/>
    
    <aura:attribute name="startPoint" type="Object"/>
    <aura:attribute name="endPoint" type="Object"/>
    <aura:registerEvent name="fmeNewFormEvent" type="c:FmeNewPathEvent"/>
    <aura:handler event="c:FmeMapPinsEvent" action="{!c.fmeMapPinsEvent}"/>

    
    <ltng:require styles="/resource/leaflet/leaflet.css"
                   scripts="/resource/leaflet/leaflet.js"
                   afterScriptsLoaded="{!c.jsLoaded}"/>
    
    
<div id="map" style="height: -webkit-fill-available; width: -webkit-fil-available;">
        <c:FmePathForm newPath="{!v.newPath}" addPath="{!v.addPath}"/>
</div><!--End of MAP-->

</aura:component>
//mapcomponent controller
({
   jsLoaded: function(component, event, helper) {

      var map = L.map('map', {zoomControl: true}).setView([-25.781693, 28.277831], 14);
      L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
        {
              attribution: 'Tiles © Esri'
        }).addTo(map);
       component.set("v.map", map);
       var coordinates = new Array();
       map.on('click', function(e){
			//bind a new object to the array and display
           coordinates.push(e.latlng);
           helper.showCoordinates(map, e);
           
           //if there is two coordinates show form to add a new path
           if(!coordinates.isNaN && coordinates.length == 2){
               helper.setNewPath(component, coordinates, event);
               coordinates.length = 0;
               
           }
       });
  }, 
    
    fmeMapPinsEvent : function(component, event, helper){
        var map = component.get('v.map');
        var coordinates = event.getParam('coordinates');
        if(coordinates !== 'undefined'){

           for(var i = 0; i < coordinates.length; i++){
                var coordinate = coordinates[i];
               console.log('Pass: fmeMapPinsEvent\n' + 'coordinate:'+  coordinate);
                var latlng = ([coordinate.TrackerCoordinate_Location__Latitude__s, coordinate.TrackerCoordinate_Location__Longitude__s]);
               	var popupContent = '<form>'
                +'<div class="form-group" >'
                                       +'<h4 align="center">'+ "Elephant Details" + '<h4>'
                                        +'<h5>' + coordinate.Name +'<h5>'
                                    	+'<label><strong>' + "Id"+ '</strong></label>'
                                        +'<br/>'
                                        +'<p>'+coordinate.TrackerCoordinate_ObjectName__c+'</p>'
						                +'<label><strong>'+ "Coordinates"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>'+ coordinate.TrackerCoordinate_Location__Latitude__s + ' ; '+ coordinate.TrackerCoordinate_Location__Longitude__s+'</p>'
                                        +'<label><strong>' +"Address"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>' +coordinate.TrackerCoordinate_Address__c+'</p>'
                                        +'<label><strong>'+ "Time"+'</strong></label>'
                                        +'<br/>'
                                        +'<p>'+coordinate.TrackerCoordinate_Timestamp__c+'</p>' 
                                   +'</div>'
                                +'</form>';
                L.marker(latlng, {coordinate: coordinate}).addTo(map).bindPopup(popupContent);
            }
        }
        else{
            console.log('Fail: fmeMapPinsEvent\n' + 'coordinates:'+  coordinates);
        }
    },
    
    closePopup : function(component, event, helper){
        component.set("v.addPath", false);
   	},
    
    Save: function(component, event, helper){
        var name = component.find("pathName");
        var value = name.get("v.value");
        console.log(name);
    },

})
//helper
({
    showCoordinates: function(map, e){
             var popup = L.popup().setLatLng(e.latlng).setContent('<div>' + e.latlng+ '</div>').openOn(map);
    },
    setNewPath: function(component, coordinates, event){
        component.set("v.newPath.TrackerPath_StartPoint__c", coordinates[0]);
        component.set("v.newPath.TrackerPath_EndPoint__c", coordinates[1]);
        component.set("v.newPath.PathName__c", "Path Name");
        component.set("v.addPath", true);
    }
})
//PathComponent
<aura:component controller="FmePathController">
<aura:attribute name="newPath" type="TrackerPath__c"
                    default="{'sObjectType':'TrackerPath__c',
                             'PathName__c': 'Path Name',
                             'TrackerPath_StartPoint__c':'',
                             'TrackerPath_EndPoint__c':''}" 
                    access="public"/>
    <aura:attribute name="addPath" type="Boolean" default="false"/>
    <aura:attribute name="saved" type="Boolean" default="false"/>
	
    <aura:handler event="c:FmeNewPathEvent" action="{!c.fmeNewPathEvent}"/>  
    
    <aura:if isTrue="{!v.addPath}">
    	<div role="dialog" tabindex="-1" aria-labelledby="header" class="slds-modal slds-fade-in-open">
        	<div class="slds-modal__container">
                <!--POPUP HEADER-->
            	<div class="slds-modal__header">
                    <button class="slds-button slds-modal__close slds-button--icon--inverse" title="Close" onclick="{!c.closePopup}">X
                        <span class="slds-assistive-text">Close</span>
                    </button>
					<h2 id="header" class="slds-text-heading--medium">Add new path</h2>
                </div>
                <!--/POPUP HEADER-->
                <!--POPUP BODY-->
                <div class="slds-modal__content slds-p-around--medium">
					<form class="slds-form--horizontal slds-form--stacked">
                        <div class="slds-form-element">
                           <span class="slds-form-element__label">Path Name</span>
                           <div class="slds-form-element__control slds-border">
                               <ui:inputText aura:id="name" label="Path Name"
                                             class="slds-input"
                                             labelClass="slds-form-element__label"
                                             value="{!v.newPath.PathName__c}"
                                             required="true" />    </div>
                        </div>
                        <div class="slds-form-element">
                            <span class="slds-form-element__label">StartPoint</span>
                            <div class="slds-form-element__control slds-border">
                                <input aura:id="startPoint" label="StartPoint"
                                       class="slds-input"
                                       labelClass="slds-form-element__label"
                                       value = "{!v.newPath.TrackerPath_StartPoint__c}"
                                       required="true"/>
                            </div>
                        </div>
                        <div class="slds-form-element">
                            <span class="slds-form-element__label">Destination Point</span>
                            <div class="slds-form-element__control slds-border">
                                <input aura:id="endPoint" label="Destination Point"
                                       class="slds-input"
                                       labelClass="slds-form-element__label"
                                       value = "{!v.newPath.TrackerPath_EndPoint__c}"
                                       required="true"/>
                            </div>
                        </div>
                    </form>
                </div>
                <!--/POPUP BODY-->
                <!--FOOTER-->
                <div class="slds-modal__footer">
                	<button class="slds-button slds-button--neutral" onclick="{!c.closePopup}">Cancel</button>
                    <button class="slds-button slds-button--brand" onclick="{!c.savePath}">Save</button>
                </div>
                <!--/FOOTER-->
            </div>
        </div>
    </aura:if>
    
<!--/EVENT HANDLERS-->
    <!--/VARIABLES/EVENTS-->
    
    <!--VISUAL CONTENT-->
    
    <!--/VISUAL CONTENT-->
</aura:component>

//controller
({
    fmeNewPathEvent: function(component, event, helper){
        console.log("doInit");
        var tempObject  = event.getParams("newPath");
        console.log(tempObject);
        component.set("v.newPath", tempObject);
        
    },
    closePopup : function(component, event, helper){
        component.set("v.addPath", false);
    },
    savePath : function(component, event, helper)
    {
        var name = component.find("pathName");
        var value = name.get("v.value");
        console.log(value);
        console.log(component.get("v.newPath"));
    }
      
})


 

 

 

friends,
i have written schedule apex for calling webservice every hour,batch apex is invoked inside the schedule apex.from this service response will be got and records are inserted from that response.i am using soap api webservice.now i am writing test classes for this.but iam getting  this error.
how can i fix it?
here is the error---
​'System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out '
Team, need your help please. Looking for someone who have used Salesforce Connect to push the price to SAP via NetWeaver Gateway and willing to share the experience. We are testing it out for one of our projects. Would appreciate any contacts to reach out to. Thanks.
We are piloting the OData External Data Source Connector.
The service we are testing was sourced from sql server stored procedures with parameters.
The "tables" sync successfully, but throw an error when an attempt is made to access them.
Unable to complete OData query for 'CustomerAccountSet'. Please check service status and authentication attributes Error ID: 509387730-25493 (702911041)
I can access the urls beneath the endpoint just fine via the ajax toolkit on a VF page, but cannot query or view the synced external objects.

We had great success accessing test external objects from http://services.odata.org/Northwind/Northwind.svc, so we know that the connector works well under certain circumstances.

Thanks, mb