function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mukesh nanimukesh nani 

compile error @remoteaction

plz give me solution
User-added image
Alexander TsitsuraAlexander Tsitsura
Hi,

The problem in double closed '}' (line 2-3). For solve it, remove '}' on line 3.

Thanks,
Alex
pconpcon
This is because you have an extra close curly brace.
 
global with sharing class WarehousUtils {
    public WarehouseUtils(ApexPages.StandardSetController controller) {}

    @RemoteAction
    global static List<Warehouse__c> findNearbyWarehouses(String lat, String lon) {
        List<Warehouse__c> results = new List<Warehouse__c>();

        return results;
    }
}

Please note that in the future you should copy and paste your code into the post.  As well as giving a clear description of your problem.  Just saying "plz give me solution" is likely to make people here less likely to help you.  Using full and complete sentences will get you a long way to getting the help you require.

NOTE: When including code please use the "Add a code sample" button (icon <>) to increase readability and make referencing code easier.