Use case:

  • SelfService Portal (yes, an old org ca. 2007 but still using this feature)
  • Triggers and workflows associated with CaseComment
  • Case comment added from Self Service Portal as in screen shot below

Question: If the triggers/workflows aren't doing what one expects, how does one debug this using the Debug Log?

Facts as I see them:

  • The running user is not the automated case user when case comments are inserted
  • The running user is of type SelfServiceUser (key prefix 035)
  • Trace Flags can't be set for SelfServiceUser, only User

Short of injecting a beacon into the org that uses an email alert or apex outbound email to broadcast fields that might be of use in diagnostics, is there some other alternative that exploits the OOTB debug log?

enter image description here

  • Have you tried turning on class specific debugs in the developer console? developer.salesforce.com/docs/atlas.en-us.apexcode.meta/… You'll have to keep the dev console open while running your tests but it should work. If you want to debug issues when you're logged in as a certain user you might consider using test classes with system.runAs
    – gNerb
    Commented Mar 22, 2017 at 3:26
  • @Toby - 1) class-specific and trigger-specific trace flags override the default log levels for the running user; 2) SelfServiceUsers aren't Users so you can't do system.runAs() and 3) I'm not running tests, I'm diagnosing a live system from a user event on the Self Service portal
    – cropredy
    Commented Mar 22, 2017 at 3:31
  • I understand you're not running tests but code is code. all you have to do is trigger the code to get a debug log. 1) Doesn't sound like an issue?
    – gNerb
    Commented Mar 22, 2017 at 3:45
  • @Toby -- maybe I'm missing something but debug logs are associated with users and enabled when you setup logging for that user. For a self-service portal user, there is no user to enable the log for as SSP users aren't users.
    – cropredy
    Commented Mar 22, 2017 at 17:59
  • 1
    i will give this a whirl; there is a trigger on CaseComment so if I do what you suggest, I might be able to get the WF debug trace as well.
    – cropredy
    Commented Mar 23, 2017 at 0:54

1 Answer 1


Well, here's the answer from SFDC R&D via Premier Support

As they prioritize the work that most strongly benefits the greatest number of customers, and while this particular feature would be nice to have, we don't feel it's ever going to reach the top of the list. Please feel free to enter this as an IdeaExchange idea and gather support for it; if enough customers feel this would be highly valuable to them we can reassess the priority.

I am not surprised - Self Service Portal is an obsolescent feature.

The only workaround is to install beacons in your triggers, workflows or process builder logic. Such beacons would either send emails or write to a persistent object (such as the Case) with details known to the trigger/workflow/process and hope that yields enough insight as to why your trigger/workflow/or process is not behaving as you would expect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .