cancel
Showing results for 
Search instead for 
Did you mean: 

ServiceMax Go -- Discrepancies in LAST_N_DAYS and NEXT_N_DAYS literals

Highlighted
Product Team
Product Team

ServiceMax Go -- Discrepancies in LAST_N_DAYS and NEXT_N_DAYS literals

Discrepancies in LAST_N_DAYS and NEXT_N_DAYS literals

We have discovered that the Salesforce implementation of the LAST_N_DAYS and NEXT_N_DAYS literals does not match up with the documentation provided which describes the intended behavior. The discrepancies can cause differing results when evaluating Qualification Criteria and SFM Search expressions locally on ServiceMax Go, versus the results obtained when performing online searches using the same Qualification Criteria and SFM Search expressions.

This feature was implemented on the ServiceMax Go following the Salesforce documentation. On Go, when using a date range literal for LAST_N_DAYS, results including TODAY will not be included. When using a date range literal for NEXT_N_DAYS, results including TODAY will be included.

However, due to a bug in the Salesforce implementation of the SOQL queries online:

When performing an online search using a date range literal for LAST_N_DAYS, results including TODAY will be included.

When performing an online search using a date range literal for NEXT_N_DAYS, results including TODAY will not be included.

For situations where this discrepancy could present a problem, we would advise adding an additional qualification criteria/expression for those situations where TODAY is desired for the results of LAST_N_DAYS. Along the same lines, for NEXT_N_DAYS, add an additional qualification criteria/expression to exclude TODAY, to match online search results

ServiceMax has been informed that Salesforce has logged an internal defect to address this issue. Once that is resolved on their end, the date range literals should be consistent whether they are being evaluated locally on the app, or via an online search (i.e. LAST_N_DAYS will not include results of TODAY and NEXT_N_DAYS will include results of TODAY).

Salesforce Case Reference:

Case Number : :#25052900

Case URL:  https://partners.salesforce.com/partnerCaseDetails?Id=5000M00000pac0yQAA

0 Likes
Reply