Foundations Apex API Developer Reference

fferpcore.SObjectPlugin

global abstract class SObjectPlugin implements UserInformationPlugin.Work

Template for a UMT plugin that creates SObjects, each of which links to a user ID and another SObject. For example, create permission set assignments, each of which links to a user ID and a permission set.

This class implements the following interfaces:

Methods

hasAccess

global abstract String hasAccess()

Determines if the current user has access to run this plugin.

Return Value

An error message when insufficient access, or null when sufficient access.

getTargetObjectType

global abstract SObjectType getTargetObjectType()

Return Value

The SObjectType of the records to be created by the plugin.

getLinkedObjects

global abstract List<SObject> getLinkedObjects(Set<String> data)

Input Parameters

Name Type Description
data Set<String> The data requested by the templates. For example, permission set names.

Return Value

The SObjects that the target objects will be linked to. For example, permission set records.

getTargetObjects

global abstract List<SObject> getTargetObjects(Set<Id> userIds, Set<String> data)

Input Parameters

Name Type Description
userIds Set<Id> The IDs of the users requiring changes from the plugin.
data Set<String> The data requested by the templates. For example, permission set names.

Return Value

Any existing target objects for the given user IDs and data.

getTargetUserId

global abstract Id getTargetUserId(SObject targetObject)

Input Parameters

Name Type Description
targetObject SObject The target record to extract the user ID from.

Return Value

The user ID specified on the given target record.

getTargetLinkedData

global abstract String getTargetLinkedData(SObject targetObject)

Input Parameters

Name Type Description
targetObject SObject The target record to extract the data from.

Return Value

The data specified on the given target record.

getLinkedObjectData

global abstract String getLinkedObjectData(SObject linkedObject)

Input Parameters

Name Type Description
linkedObject SObject The linked record to extract the data from.

Return Value

The data specified on the given linked record.

createTarget

global abstract SObject createTarget(Id userId, SObject linkedObject)

Create a target record for the given user ID and linked record.

Input Parameters

Name Type Description
userId Id The ID of the user.
linkedObject SObject The linked record. For example, permission set.

Return Value

The new target record.

© Copyright 2009–2020 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.