You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ethan Dunzer edited this page Aug 29, 2024
·
2 revisions
Overview
The WorkListViewController class is responsible for retrieving work records associated with the current user within a Salesforce application. This class provides a method to fetch work records that the user is a part of through related Work Item Team records.
Methods
getWorkRecords
This method retrieves work records that are associated with the current user by querying Work Item Team records.
Signature:
@AuraEnabled(cacheable=true)
public static List<agf__ADM_Work__c> getWorkRecords()
Parameters:
None.
Returns:
A list of agf__ADM_Work__c records that are associated with the current user through Work Item Team records.
Details:
Captures the current user's ID.
Constructs a SOQL query to fetch work records where the current user is listed on a related Work Item Team record.
Returns the list of work records associated with the user.
Example Usage: This method can be used to fetch all work records that the logged-in user is assigned to, based on their inclusion in Work Item Team records.