Hi All ,
we are using the multiple feature and Context (type) as per our requirement while writing Apex code.
Sample are:-
so we can identify these context item in Apex code as give way:-
we are using the multiple feature and Context (type) as per our requirement while writing Apex code.
Sample are:-
- Batch
- @future
- Queueable
- Schedulable
- Trigger
- Visualforce
- Apex REST
so we can identify these context item in Apex code as give way:-
- Batch - System.isBatch()
- @future - System.isFuture()
- Queueable - System.isQueueable()
- Schedulable - System.isScheduled()
- Trigger - Trigger.isExecuting
- Visualforce - ApexPages.currentPage() != null
- Apex REST - RestContext.request != null