function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mhamberg1mhamberg1 

web 2 lead owner assignment

I've setup my lead object with a trigger that looks at a zip code table and assigns the proper owner for the lead.

 

This works great when I manually create a lead or load them in with the dataloader. However, when someone submits a lead from our website (web-to-lead), they are all getting assigned to me (not even the default owner). 

 

Is there something I have to turn on to enable my web-to-lead to fire off my Apex trigger? Is there a way that I can debug the web 2 lead process besides the debug email option (I already have that turned on). I'm looking for a way to write out my trigger code to a log and see if it is firing in the web to lead process.

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
KevinLaurenceKevinLaurence

Why don't you try a debug log?

 

A debug log records errors and system processes that occur in your organization. Debug logs contain information about:
  • Database changes
  • Automated workflow processes, such as:
    • Workflow rules
    • Assignment rules
    • Escalation rules
    • Auto-response rules
    • Approval processes
  • Validation rules
  • Request-response XML
  • Apex script errors
  • Resources used by an Apex script

 

Click Setup / Monitoring / Debug Logs.

All Answers

shillyershillyer

Can you use the System Log to debug? 

 

Hope that helps,

Sati

mhamberg1mhamberg1

I'm not really sure. I looked at some of the documentation on that, but it looks like it is more for testing Apex code on-demand rather than outputting the results of a process that is already in production.

 

Is there a way to configure the system log to read the results of the web 2 lead trigger?

 

Thanks

KevinLaurenceKevinLaurence

Why don't you try a debug log?

 

A debug log records errors and system processes that occur in your organization. Debug logs contain information about:
  • Database changes
  • Automated workflow processes, such as:
    • Workflow rules
    • Assignment rules
    • Escalation rules
    • Auto-response rules
    • Approval processes
  • Validation rules
  • Request-response XML
  • Apex script errors
  • Resources used by an Apex script

 

Click Setup / Monitoring / Debug Logs.

This was selected as the best answer
mhamberg1mhamberg1
Thanks - that was what I was looking for.