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
mohit tripathimohit tripathi 

How to see debug log for the Trigger?

Suppose I have a very basic trigger on contact which updates  Department and I have few system.debug lines on my code.
I have updated a contact in salesforce and now want to see that system.debug line but how to check that.How to Open the log for your latest action?

I can see execute anonymous , but I have already updated a contact in salesforce so Was I suppose to do that from here or what?
Please help me to understand this.

 

Thanks in Advance

Nayana KNayana K
Set up debug log level:
Setup => Debug Logs => Click on "New" or Edit if in your user name already record is present => 
User-added image

Select your user name and set the dates (current date and time + tomorrow's date time [Or anything max 24hours range).Create "New Debug level " by simply accepting defaults as of now (or select "SFDC_DevConsole" if available from that lookup icon) and save this trace flag record.

Update the contact => Refresh the Debug Logs page :
User-added image

Recent record will have the log. Click on "view" link.