Skip to main content

Apex

Introduction

SF Explorer parses your Apex code to find JS Docs annotations, This information is then available in the UI.

Example

/**
* @author John Doe
* @date 25/04/2023
* @description BoatDataService
**/
public with sharing class BoatDataService {

public static final String LENGTH_TYPE = 'Length';
public static final String PRICE_TYPE = 'Price';
public static final String TYPE_TYPE = 'Type';

@AuraEnabled(cacheable=true)
public static List<Boat__c> getBoats(String boatTypeId) {
// Without an explicit boatTypeId, the full list is desired
String query = 'SELECT '
+ 'Name, Description__c, Geolocation__Latitude__s, '
+ 'Geolocation__Longitude__s, Picture__c, Contact__r.Name, '
+ 'BoatType__c, BoatType__r.Name, Length__c, Price__c '
+ 'FROM Boat__c';
if (String.isNotBlank(boatTypeId)) {
query += ' WHERE BoatType__c = :boatTypeId';
}
query += ' WITH SECURITY_ENFORCED ';
return Database.query(query);
}

}

Compare Apex classes

You can select 2 apex classes and compare them (works accross multiple orgs as well)