Skip to main content
Yeturu Srikanth (bigworks) 님이 #Apex에 질문했습니다
Controller

var dataMap = component.get("v.values");  

      //  console.log(accountId) ;

        var accountList = [];       

        for ( var key in dataMap ) {

            accountList.push({key: key, value:dataMap[key]});

        }

        console.log(accountList) ;        

        var action = component.get("c.updateSortOrder");

        // console.log(accountList) ;

        action.setParams({

            "updateTasksMap":accountList

        });  

AuraEnabled

    Public static void updateSortOrder(Map<string, List<Task__c>> updateTasksMap){ 

        System.debug(updateTasksMap.keyset()) ;

        
답변 4개
  1. 2021년 5월 24일 오후 5:41
    Hi Ramana,

    You can go through below link. both have similar situation as of yours

    https://stackoverflow.com/questions/41876959/how-to-send-javascript-map-as-a-parameter-from-lightning-component-to-apex-serve

    https://salesforce.stackexchange.com/questions/157732/how-to-send-javascript-map-as-a-parameter-from-lightning-component-to-apex-serve

    Hope it helps, Please mark it best answer so that other facing similar issue find it useful.

    Thanks!
0/9000