jongpie / NebulaLogger

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.
https://nebulalogger.com
MIT License
644 stars 153 forks source link

Provide Log Entry ID as an Output Variable on all Flow Actions #595

Open justin-lyon opened 6 months ago

justin-lyon commented 6 months ago

New Feature Summary

I've created a generic Fault Screen that will log all errors to nebula then display a screen to the user with their error message.

It would be very handy if I could display a link to the new Log Entry in the Fault Screen so the end users could include it when submitting a request to our helpdesk.

In order to do that, I would need the Log ID that was created after the Log Error is completed.

image

jongpie commented 5 months ago

@justin-lyon providing a link to the log entry probably isn't feasible - the LogEntry__c record is created async (using platform events), so there's not a Salesforce record/record ID at that point. I'm also limited on what changes I can make to the returned value for the Flow actions (due to limitations with changes in managed packages).

If I'm able to come up with a way to return a link that takes you to the Log__c record (instead of a specific LogEntry__c record), would that work for you? Making it work for a Log__c record is also going to be slightly tricky, but I have a few ideas of how to try to make it work.

justin-lyon commented 5 months ago

I'm open to alternatives.

Using an external Id field with a guid generated at runtime comes to mind.

jongpie commented 5 months ago

Sounds good - I'm going to try to tinker with a few ideas over the next few weeks to see what's feasible, I'll keep you updated.