You need to sign in to do that
Don't have an account?
Chandramohan Yetukuri 1
Hello i am not able to pass a list of strings from lwc to apex. Getting the error: "message":"Value provided is invalid for action parameter 'testList' of type 'LIST'"
var OPTION1 = this.template.querySelector("lightning-datatable[data-myid=dt6]").getSelectedRows();
var OPTION2 = JSON.stringify(OPTION1);
Calling Apex Method:
callNext({
stringList : OPTION1 or OPTION2
})
*********************************************
***ERROR MESSAGE I AM GETTING********
*********************************************
"message":"Value provided is invalid for action parameter 'stringList ' of type 'LIST'"
var OPTION2 = JSON.stringify(OPTION1);
Calling Apex Method:
callNext({
stringList : OPTION1 or OPTION2
})
*********************************************
***ERROR MESSAGE I AM GETTING********
*********************************************
"message":"Value provided is invalid for action parameter 'stringList ' of type 'LIST'"
@track Option1=[];
this.Option1.push(this.template.querySelector("lightning-datatable[data-myid=dt6]").getSelectedRows());
callNext({
stringList : this.Option1,
})