You need to sign in to do that
Don't have an account?
Sophia G
Help with a line of apex code
Hi,
I am new to coding and just need some help with inserting my selected fields values from my record (the record the lightning component is on) into my selected records. I have selected the fields I'm just unsure how to write the code to add them into my selected records.
APEX:
I am new to coding and just need some help with inserting my selected fields values from my record (the record the lightning component is on) into my selected records. I have selected the fields I'm just unsure how to write the code to add them into my selected records.
APEX:
@AuraEnabled public static void updateRecord(List <String> lstRecordId, String oppRecordId) { List<Opportunity> lstUpdate = new List<Opportunity>(); for(Opportunity Opp : [SELECT Id, Name, Check_In_Date__c, Check_Out_Date__c, Total_Amount__c, Deposit_Amount__c, SyncedQuoteId FROM Opportunity WHERE Id IN : lstRecordId]){ lstUpdate.add(Opp); } if(lstUpdate.size() > 0){ update lstUpdate; }
Carolina W 2
I'm begginer too, I don't know if I understood what you want, but I tried to help you.