I encountered an issue, as I want to access a property of an object I'm passing from a lwc to an apex method, like this:
valuesObj.ml_id = this.sfItem.id;
this.itemObj = valuesObj;
and then:
processItemEdit( {item : this.itemObj} ).then(r => {
console.log('r', r);
});
This is the apex method:
@AuraEnabled
public static void processItemEdit(CsvItem item){
List<CsvItem> items = new List<CsvItem>();
String seller_id = String.valueOf(item.ml_id);
Seller_Setting__c setting = SellerSettingDataManager.getSetting(seller_id);
setting = BatchApexListItems.getSetting(setting.id);
items.add(item);
BatchApexListItems.processItemsCsv(items, setting);
}
For some reason, apex throws an error when I try to deploy, saying the variable 'item.ml_id' does not exist, when it is defined in the first line of code I included here. What is going on?