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
pp11222pp11222 

How to determine if apex code is executed from visualforce page

Is there a way to  determine if apex code is executed from visualforce page.

 

I have some classes which have calls to ApexPages methods and they give run time errors when they are not called from VF page.

 

Thanks

 

Anup JadhavAnup Jadhav

You can try adding some debug statements in your controller code, or trigger code where you' d like to track the section being executed.

 

For e.g. just add something like:

 

system.debug('is this methodxxyy() being executed?');

 

 Then enable debug logs to see if the apex code in the controller or trigger is being executed.

 

You can enable debug logs via Setup. Search for debug logs in the setup search box.

 

- Anup