function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
THUNDER CLOUDTHUNDER CLOUD 

How to fetch date from created by field ?

I want to fetch created date from created by field .

How to achieve this ?
SandhyaSandhya (Salesforce Developers) 
Hi,

You can write soql 
select id,CreatedDate from Account;
and also you can give where conditions (where createdby=:user.id)in query
or 
You are looking for something else?Please elaborate your question.

Thanks and Regards
Sandhya
Ashish KumarAshish Kumar
Hi,

You first need to get the Id of Users who could be responsible for creating the record and the fire the SOQL for the user who created the record.
You can use below SOQL to get the result:
List<User> myUserList = new List<User>();
myUserList = [Select Name,Id from User];
for(User u :myUserList){
System.debug([Select CreatedDate From ObjectName where CreatedById =:u.id]);
}

Thanks,
Ashish 
 
THUNDER CLOUDTHUNDER CLOUD
Hi,

I am working on opportunity. 
Requirement is to create one opportunity per day.


With Regards,

THUNDER CLOUD 
Ganesh ThiagarajanGanesh Thiagarajan
  • Hi frnd am new to salesfirce e api. Is thr a Way to get h only latest data from sales force
  • Say i hv 30000 customer how to fetch by query to getLatestUodayedRecord()
  • Also getNewlyAddedAccount(currentDate)
  • Your help would do wonders
8754419005