SOQL to get next 45 days records

Next_N_Days is used to get next N days records from the object.

The below query will fetch accounts where it\’s Next Billing Date is today and within next 45 days.

Sample SOQL:

SELECT Id FROM Account WHERE Next_Billing_Date__c >= TODAY AND Next_Billing_Date__c  <= Next_N_Days:45

Cheers!!1

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Please check your mail for confirmation.

Leave a Comment

Your email address will not be published. Required fields are marked *

Select Language »