Foundations Apex API Developer Reference

fferpcore.ffasync_Notification

global class ffasync_Notification

Holds information for Notifications. The following default Notification types are supported: Task; Chatter; Email. If Task or Chatter notifications are not enabled then an Email notification is sent for error messages.

fferpcore.ffasync_Notification.TaskNotification

global class TaskNotification implements ffasync_IAction

Class for Task Notification

This class implements the following interfaces:

Methods

TaskNotification

global TaskNotification(fferpcore.ffasync_ProcessService.NotificationData data, String priority)

Generates a task notification containing the default values for Text, Priority and Application Details.

Input Parameters

Name Type Description
data fferpcore.ffasync_ProcessService.NotificationData Instance for NotificationData class which contains recipientUserIds and application Name
priority String [Optional] Priority for Task Notification, By default it's High

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

String priority = 'High';
String appName = 'FinancialForce';
User u; // should be the required user
Set<User> usersToBeNotified = new Set<User>{u};
fferpcore.ffasync_ProcessService.NotificationData data = new fferpcore.ffasync_ProcessService.NotificationData(usersToBeNotified, appName); 
fferpcore.ffasync_Notification.TaskNotification taskNotification = new fferpcore.ffasync_Notification.TaskNotification(data, priority);

TaskNotification

global TaskNotification(fferpcore.ffasync_ProcessService.NotificationData data)

Generates a task notification containing the default values for Text, Priority and Application Details.

Input Parameters

Name Type Description
data fferpcore.ffasync_ProcessService.NotificationData Instance for NotificationData class which contains recipientUserIds and application Name

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

String priority = 'High';
String appName = 'FinancialForce';
User u; // should be the required user
Set<User> usersToBeNotified = new Set<User>{u};
fferpcore.ffasync_ProcessService.NotificationData data = new fferpcore.ffasync_ProcessService.NotificationData(usersToBeNotified, appName); 
fferpcore.ffasync_Notification.TaskNotification taskNotification = new fferpcore.ffasync_Notification.TaskNotification(data, priority);

fferpcore.ffasync_Notification.ChatterNotification

global class ChatterNotification implements ffasync_IAction

Class for Chatter Notification

This class implements the following interfaces:

Methods

ChatterNotification

global ChatterNotification(fferpcore.ffasync_ProcessService.NotificationData data)

Generates Chatter Notifications for the supplied Users, including the current User, for the specified Process

Input Parameters

Name Type Description
data fferpcore.ffasync_ProcessService.NotificationData Instance for NotificationData class which contains recipientUserIds and application Name

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

User u; // should be the required user
Set<User> usersToBeNotified = new Set<User>{u};
String appName = 'FinancialForce';
fferpcore.ffasync_ProcessService.NotificationData data = new fferpcore.ffasync_ProcessService.NotificationData(usersToBeNotified, appName);
fferpcore.ffasync_Notification.ChatterNotification chatterNotification = new fferpcore.ffasync_Notification.ChatterNotification(data);

fferpcore.ffasync_Notification.EmailNotification

global class EmailNotification implements ffasync_IAction

Class for Email Notification

This class implements the following interfaces:

Methods

EmailNotification

global EmailNotification(fferpcore.ffasync_ProcessService.NotificationData data)

Generates email notifications for the supplied Users, including the current User, with the supplied Application Details. These details are set in the From field of the email. The default is FinancialForce.

Input Parameters

Name Type Description
data fferpcore.ffasync_ProcessService.NotificationData Instance for NotificationData class which contains recipientUserIds and app Name

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Set<String> usersToBeNotified = new Set<String>{'user@ff.com'};
String appName = 'FinancialForce';
fferpcore.ffasync_ProcessService.NotificationData data = new fferpcore.ffasync_ProcessService.NotificationData(usersToBeNotified, appName); 
fferpcore.ffasync_Notification.EmailNotification emailNotification = new fferpcore.ffasync_Notification.EmailNotification(data);

EmailNotification

global EmailNotification(fferpcore.ffasync_ProcessService.NotificationData data, Set<String> recipientEmails)

Generates email notifications for the supplied Users, including the current User, with the supplied Application Details. These details are set in the From field of the email. The default is FinancialForce.

Input Parameters

Name Type Description
data fferpcore.ffasync_ProcessService.NotificationData Instance for NotificationData class which contains recipientUserIds and app Name
recipientEmails Set<String> [Optional] Set of emails of users for Email Notifications

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Set<String> usersToBeNotified = new Set<String>{'user@ff.com'};
String appName = 'FinancialForce';
fferpcore.ffasync_ProcessService.NotificationData data = new fferpcore.ffasync_ProcessService.NotificationData(usersToBeNotified, appName); 
fferpcore.ffasync_Notification.EmailNotification emailNotification = new fferpcore.ffasync_Notification.EmailNotification(data);
© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.