Loading

Debug a system user

Publiseringsdato: Oct 13, 2022
Beskrivelse

The standard "debug logs" page does not allow you to set up a debug log for certain users such as the S2S connection users or automated users.
Løsning

You can use the Tooling API to create a new trace flag (debug log ) for this type of users. 
1. Log into Workbench https://workbench.developerforce.com/login.php
2. Navigate to Utilities > REST Explorer
3. Select POST, enter the URI below, and use the example body provided
 
/services/data/v35.0/tooling/sobjects/TraceFlag/

{ 
 "TracedEntityId" : "005i0000002Xx2qAAC", 
 "ExpirationDate" : "2016-01-07T15:04:31.000+0000", 
 "DebugLevelId" : "7dli0000000GmaEAAS", 
 "LogType" : "USER_DEBUG", 
 "StartDate" : "2016-01-07T14:34:31.000+0000" 
 }
 
TracedEntityId: The User ID for the user you want to debug, you can obtain this by querying the record that was created or updated by this user.

ExpirationDate: indicates the end date/time for this debug.

LogType: This option is used to select an existing debug level.

DebugLevelId: When the LogType is specified, you must specify a debug level id*

*You can obtain the DebugLevelID value by issuing the query below in the developer console or in workbench.

SELECT Id, DeveloperName FROM DebugLevel

*Please make sure to check the box for 'Tooling API' to be able to run this query in Developer console.

For a complete list of fields and option to set up a TraceFlag refer this document.
 
Knowledge-artikkelnummer

000386565

 
Laster
Salesforce Help | Article