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
nasknask 

NEXT_N_DAYS:n is not working in dataloader

have anyone trried using NEXT_N_DAYS:n in dataloader query ? i know that this can be used in apex but can that be used in dataloader?

 

 

my requriment is to run a query in dataloader using something ilike today+ 3? so any one can help?

sfdcfoxsfdcfox

Yes, NEXT_N_DAYS is specified in the SOQL language, not specifically Apex Code.

 

SELECT Id FROM Opportunity WHERE CloseDate = NEXT_N_DAYS:3

Make sure you're not forgetting the colon between the two tokens.

sfdcfoxsfdcfox

Keep in mind that the function will return a date range, not just one day. If you want something exactly three days out, you'll need to make it "greater than 2 days out and less than 4 days out".

v varaprasadv varaprasad
SOQL to get next 7 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 7 days.

Sample SOQL:

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