Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
List<Invoice_Number > invoiceNumberList = [SELECT Id,Status,Price FROM Invoice_Number WHERE Status =: 'Open']; List<Invoice_Number > listInvoiceToUpdate = new List<Invoice_Number >(); for(iInvoice_Number in : invoiceNumberList){ in.Price = 100; listInvoiceToUpdate.add(in); } if(!listInvoiceToUpdate.IsEmpty(){ system.debug ('+++++' + listInvoiceToUpdate); update listInvoiceToUpdate; }
In case, you have existing records,
You can first comment out the update statement, check the debug and if the records are correct uncomment ant execute the script.
Hope this helps.
Regards
Medhya Mahajan