Print this page

Unable to set Trace Flag for longer than 24 hours

Knowledge Article Number 000240506
Description I am trying to troubleshoot something that is happening randomly so I tried to set a Debug Log for the affected user that could catch their activity for the next couple of days and hopefully get to capture the issue. However, when I hit save I received:

Error: Trace flags can be active for up to 24 hours. Set ExpirationDate to be less than 24 hours from StartDate, or, if StartDate is null, less than 24 hours from now.

How can I troubleshoot the issue if I can't setup a Debug Log to run long enough to catch it?

Steps to Replicate:
1. From Setup enter Debug Logs.
2. Click New on the Debug Logs page in the User Trace Flags section.
3.  Fill out the required fields on the New Trace Flag page.
4.  Set the Expiration Date for 1 week away.  
5.  Save and receive the error "Trace flags can be active for up to 24 hours. Set ExpirationDate to be less than 24 hours from StartDate, or, if StartDate is null, less than 24 hours from now.".
Resolution It is expected that a Debug Log Trace Flag is limited to a 24 hour period. To workaround this you can setup multiple Trace Flags for the affected user set for the maximum of 24 hours.

Workaround Steps:
1.  From Setup enter Debug Logs.
       a. Click New on the Debug Logs page in the User Trace Flags section.
       b. Fill out the required fields on the New Trace Flag page.   
       c. The Start Date defaults so in the Expiration Date set it for 24 hours from that date and time. 
       d. Save the Trace Flag.
2. Click New on the Debug Logs page in the User Trace Flags section.
3. Set the Start Date for 24 hours later than your last Trace Flag.
4. Set the Expiration Date for 24 hours later than your last Trace Flag.
5. Save and repeat steps 2-5 as needed.  

For more information about Debug Logs see Using Debug Logs




promote demote