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
ChuckchoChuckcho 

Create a custom view to query contacts created in the past one week.

How to create a custom view to query contacts created in the past one week. Every time a user logs in he should be able to view all the contacts created in the previous week.

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
Jake GmerekJake Gmerek

All you should have to do is go to the contact tab and create a new view.  Add the columns that you want and then filter it by created date being in the LAST 7 DAYS or I think that LAST WEEK is acceptable.

All Answers

Jake GmerekJake Gmerek

All you should have to do is go to the contact tab and create a new view.  Add the columns that you want and then filter it by created date being in the LAST 7 DAYS or I think that LAST WEEK is acceptable.

This was selected as the best answer
ChuckchoChuckcho

Thanks Jake. I was also trying to query the database but the logic doesn't seem to work. Below is my query. Do I need to make any changes to the query

 

Select LastName, FirstName, AccountId From Contact c where CreatedDate = LAST WEEK

 

The error says as malformed query.

ChuckchoChuckcho

Actually I got 'last_week' works

Jake GmerekJake Gmerek

Cool, glad you got it working.