• Jonathan Anderson
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
Hi everyone, 

I have this code for be able to display leads on a map with the distance away from you. 

However for me, it isnt savibg for some reason that I cant see, can anyone see what i am doing wrong please?

This is my code:
 
public with sharing class LeadVisualiserSSController {
    @AuraEnabled
    public static List<Lead> getLeads() {
        return [
            SELECT Id, Name, Latitude, Longitude
            FROM Lead
            WHERE OwnerId = :UserInfo.getUserId() AND Latitude != NULL AND Longitude != NULL
        ];
    }

    @AuraEnabled
    public static User getUserInfo() {
        return [
            SELECT Id, Name, Base_Location__Latitude__s, Base_Location__Longitude__s
            FROM User
            WHERE Id = :UserInfo.getUserId()
        ];
    }
}

Thanks very much
what are the best practises for Exception handling in salesforce.I have gone through SF Document but didn't find any where.
Thanks

Hi Guys,

 

As salesforce standard document says:

The Test.stopTest method marks the point in your test code when your test ends. Use this method in conjunction with the startTest method. Each test method is allowed to call this method only once. After calling this method, any post assertions are done in the original context.

 

 

 

I need one urgent help..Can any one tell me why do we use system.assert() method after  test.stopTest() ?

 

Please suggest me and also let me know If I getting things wrong.

 

Thanks

Joo

 

 

 

 

 

 

  • October 22, 2013
  • Like
  • 0