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
Krishna_225Krishna_225 

Formula to get records created this week

Hello Admins/Developers,
I have a requirement where a checkbox is to be checked if a record is created by a specific profile this week. So, I got the following formula: IF(CreatedBy.Profile.Name = "Territory Sales Manager" && DateValue(CreatedDate) =  THIS_WEEK  , True, False).
In the above formula, THIS_WEEK is not working in formula field. I'm recieving " Error: Incorrect parameter type for operator '='. Expected Date, received Text" error. 
Can anyone help me out with this createdDate issue so that I can extract this week's record along with the profile name.

Reagrds,
Krishna
SandhyaSandhya (Salesforce Developers) 
Hi,

There is no THIS_ WEEK contstant in formula field.

Idea has been voted for this check below link where you can find the workaround.

https://success.salesforce.com/ideaView?id=08730000000KFAU

Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya