Foundations Object Model

SObjectTarget

global virtual with sharing class SObjectTarget implements TargetObject, VirtualDataObject.SObjectRecord, TargetObject2

Implementation of TargetObject for a single SObject or DataSourceBase.Row.

This class implements the following interfaces:

Methods

SObjectTarget

global SObjectTarget(DataSourceBase.Row row)

Construct an SObjectTarget.

Input Parameters

Name Type Description
row DataSourceBase.Row A DataSourceBase.Row returned from an SObjectByIdDataSource query.

SObjectTarget

global SObjectTarget(SObject record)

Consturct an SObjectTarget.

Input Parameters

Name Type Description
record SObject The SObject to update and read.

getId

global String getId()

Return Value

The memento passed to setParent

get

global Object get(String fieldName)

getOptional

global OptionalValue getOptional(String fieldName)

put

global void put(String fieldName, Object value)

getLookup

global TargetObject getLookup(String lookupName)

Record that database work is needed for this record.

getChildren

global TargetObjectList getChildren(String fieldName)

getSObject

global SObject getSObject()

getChildRecords

global VirtualDataObject.RecordList getChildRecords(String fieldName)

addErrorListener

global void addErrorListener(VirtualDataObject.ErrorListener errorListener)

Add a listener to be notified when an error is added to the Record.

Input Parameters

Name Type Description
errorListener VirtualDataObject.ErrorListener The ErrorListener to be invoked with each error.

addError

global void addError(String key, String errorMessage)

Add an error to the record. (From the Virtual Data Object interface). Prevent save of the record.

Input Parameters

Name Type Description
key String The key of the field that caused the error.
errorMessage String A description of the error.

getDataType

global DataType getDataType(String fieldName)

destroy

global void destroy()

isDestroyed

global Boolean isDestroyed()

preventSave

global void preventSave()

isLinkControlEnabled

global virtual Boolean isLinkControlEnabled()

setLinkControlEnabled

global virtual void setLinkControlEnabled(Boolean linkControlEnabled)

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