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
·
1 revision
Overview
The WorkCardController class is responsible for retrieving work item actions associated with a specific work record and the current user within a Salesforce application. This class provides a method to fetch these actions, allowing for a detailed view of the tasks or actions that the user needs to complete.
Methods
getWorkItemActions
This method retrieves work item actions associated with a specific work record and the current user.
Signature:
@AuraEnabled(cacheable=true)
public static List<Work_Item_Action__c> getWorkItemActions(Id workId)
Parameters:
workId: The ID of the work record for which to fetch associated work item actions.
Returns:
A list of Work_Item_Action__c records that are associated with the specified work record and the current user.
Details:
Captures the current user's ID.
Constructs a SOQL query to fetch work item actions that are associated with the provided work record ID and the current user.
Returns the list of work item actions associated with the specified work record.
Example Usage: This method can be used to fetch all action items that the logged-in user needs to address for a specific work record.