void executeQuery()
{
if (DisableDefaultFilterForSysDataBaseLogFlight::instance().isEnabled())
{
utcdatetime currentDateTime;
if (DisableRemoveTimeZoneOffsetFlight::instance().isEnabled())
{
currentDateTime = DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::getSystemDateTime(), DateTimeUtil::getUserPreferredTimeZone());
}
else
{
currentDateTime = DateTimeUtil::getSystemDateTime();
}
utcDateTime pastDateTime = DateTimeUtil::addDays(currentDateTime, -7);
this.query().dataSourceTable(tableNum(SysDataBaseLog)).addRange(fieldNum(SysDataBaseLog, CreatedDateTime)).value(SysQuery::range(pastDateTime, currentDateTime));
Microsoft.Dynamics.ApplicationPlatform.XppServices.Instrumentation.DataAccessEventSource::EventWriteDirectSqlTrace
("", "ExecuteQuery","Default Filter applied on createddatetime field to display only last one week of data on Form Load","Customer is allowed to modify the filter as required");
}
super();
}
Stage | Description | Available To | Enabled By | Can Be Disabled By |
Incomplete | Microsoft internal only | Microsoft dev/test environments | Internal environment + Flight | No Logic |
PrivatePreview | Opt-in preview users | Microsoft + selected customers | Flight | Kill switch |
PublicPreview | Public rollout (default on) | All customers | Default | Kill switch |
Released | Fully released feature | All customers | Default | Kill switch |
internal final class RunnableClass1
{
/// <summary>
/// Class entry point. The system will call this method when a designated menu
/// is selected or when execution starts and this class is set as the startup class.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
SysTestFlightingManager::setFlightEnabled('DisableDefaultFilterForSysDataBaseLogFlight', DefaultNoYes::Yes);
}
}
Alireza Eshaghzadeh
799
Super User 2025 Season 2
Mohamed Amine Mahmoudi
757
Super User 2025 Season 2
Abhilash Warrier
751
Super User 2025 Season 2