Step 1 :- Create a DragandDropController apex class and copy paste below code. public class DragandDropController{ @AuraEnabled public static List<Account> getAccountData() { List<Account> lst=new List<Account>([Select id,name,CountValue__c,(select id,FirstName,LastName from Contacts) from Account order by countValue__c ]); return lst; } @AuraEnabled public static List<Account> DragDroprecordUpdate(String DragRecordId, String DropRecordId,String DragCount,String DropCount){ Map<id,Contact> mapcontact=new Map<id,Contact>([Select id,CountValue__c from Contact where id =:DragRecordId or id=:DropRecordId]); ...