Foundations Apex API Developer Reference

fferpcore.LinkingMessageToObjectMarshaller2

global interface LinkingMessageToObjectMarshaller2 extends LinkingMessageToObjectMarshaller

This class extends fferpcore.LinkingMessageToObjectMarshaller

Methods

getAdditionalSelections

Set<String> getAdditionalSelections()

This method returns the set of additional field selections needed by the applyMessages code. This method must be implemented by a class which implements LinkingMessageToObjectMarshaller2.

Return Value

Returns a set of strings objects.

applyMessages

void applyMessages(List<fferpcore.ApplyMessagesToObjectRequest> requests)

Attempts to apply the given messages to each object. The objects can be new or existing depending on correlation ID. Only responds to the messages if there is an error. Use preventSave() to prevent a save attempt. The system will respond.

onFailedMessages

void onFailedMessages(Set<String> requestKeys)

This method is executed after the new or updated records are committed to the database, but before afterApply(). This allows the marshaller to revert work corresponding to failed messages.

Input Parameters

Name Type Description
requestKeys Set<String> The unique request keys of requests that could not be committed to the database or those that failed while committing them to the database. The request key is equal to the correlation ID of the messages in the request.

afterApply

void afterApply()

This method is executed after the new or updated records are committed to the database. It can be used to commit additional records that have lookups to the primary records.

© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.