fferpcore.MessageDescriptionServiceglobal with sharing class MessageDescriptionService Service for working with fferpcore.Message Descriptions and the declarative publishing engine. MethodsbuildMessageRequestsglobal static fferpcore.MessageDescriptionService.BuildMessageRequestsResult buildMessageRequests(String productDeveloperName, String messageTypeDeveloperName, fferpcore.DataSource records) Generate multiple MessageRequest objects using both the specified DataSource, and the fferpcore.MessageDescription of the publication that corresponds to the given productDeveloperName and messageTypeDeveloperName. Any declarative fields will also included. Input Parameters
Return ValueThis service returns an MessageDescriptionService.BuildMessageRequestsResult object. 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. //Inside trigger handler. fferpcore.DataSource dataSource = new fferpcore.TriggerDataSource(Records); List<fferpcore.MessagingSystemService.MessageRequest> messages = fferpcore.MessageDescriptionService.buildMessageRequests('TestProduct', 'TestMessageType', dataSource); //Deliver messages. fferpcore.MessageDescriptionService.BuildMessageRequestsResultglobal class BuildMessageRequestsResult Instantiate the given Context, given its class name and initialisation memento, Will given an exception if instantiation fails for any reason. Methods
BuildMessageRequestsResultglobal BuildMessageRequestsResult(List<fferpcore.MessagingSystemService.MessageRequest> requests) Creates a successful result containing the given requests and no error. Input Parameters
BuildMessageRequestsResultglobal BuildMessageRequestsResult(String error) Creates a failed result containing the given error. Input Parameters
getRequestsglobal List<fferpcore.MessagingSystemService.MessageRequest> getRequests() Gets the list of mapping requests. Return ValueThis service returns a list of MessagingSystemService.MessageRequest objects. getRequestsNotNullglobal List<fferpcore.MessagingSystemService.MessageRequest> getRequestsNotNull() Gets the list of mapping requests if the list is not null, otherwise throws an exception using the error message. Return ValueThis service returns a list of MessagingSystemService.MessageRequest objects. getErrorglobal String getError() Gets the error message. Return ValueThis service returns a String object. |