You need to sign in to do that
Don't have an account?
Oleg Nikitchuk
set End_Date__c to today
Hi all,
I have a class CarRentServices, in this class there are 2 methods:
1) Method is pretty simple, it returns picklist values based on user choise, standard functionality for combobox.
2) sendEndDate() method should receive a list of records and set End_Date__c to today. I tried to apply some logic but I don't think it is right.
Here's my code:
public with sharing class CarRentServices {
public List<Deal__c> setEndDate(){ return [SELECT Id, End_Date__c FROM Deal__c WHERE End_Date__c=: System.today()];
}
@AuraEnabled
public static List<Deal__c> filterFinished(String status){ return [SELECT Name,Status__c,Sales_Manager_Email__c,Start_Date__c,End_Date__c FROM Deal__c WHERE Status__c=:status];
}
}
Please, advise!
I have a class CarRentServices, in this class there are 2 methods:
1) Method is pretty simple, it returns picklist values based on user choise, standard functionality for combobox.
2) sendEndDate() method should receive a list of records and set End_Date__c to today. I tried to apply some logic but I don't think it is right.
Here's my code:
public with sharing class CarRentServices {
public List<Deal__c> setEndDate(){ return [SELECT Id, End_Date__c FROM Deal__c WHERE End_Date__c=: System.today()];
}
@AuraEnabled
public static List<Deal__c> filterFinished(String status){ return [SELECT Name,Status__c,Sales_Manager_Email__c,Start_Date__c,End_Date__c FROM Deal__c WHERE Status__c=:status];
}
}
Please, advise!