Reporting API Documentation

ffr.DataViewService

global with sharing class DataViewService

Encapsulates all service layer logic for the Dataview functionality. For more guidelines and details see https://developer.salesforce.com/page/Apex_Enterprise_Patterns_-_Service_Layer

Date

2015

Methods

createNewDataView

global static ffr.DataViewService.DataView createNewDataView()

Creates a dataview object with no input parameters.

Return Value

This service returns a ffr.DataViewService.DataView object.

getDataView

global static List<ffr.DataViewService.DataView> getDataView(Set<ID> dataViewIds)

Retrieves the specified dataviews.

Input Parameters

Name Type Description
dataViewIds Set<ID> Identifies the dataviews that you want to retrieve.

Return Value

This service returns a list of ffr.DataViewService.DataView objects.

getDataView

global static List<ffr.DataViewService.DataView> getDataView(Set<ID> dataViewIds, Boolean isDataviewMaster)

Retrieves the specified dataviews.

Input Parameters

Name Type Description
dataViewIds Set<ID> Identifies the dataviews that you want to retrieve.
isDataviewMaster Boolean Set this to True in order to load the “in use” flags to see where the dataview is being used.

Return Value

This service returns a list of ffr.DataViewService.DataView objects.

save

global static List<ID> save(List<ffr.DataViewService.DataView> dataViews)

Saves the specified dataviews.

Input Parameters

Name Type Description
dataViews List<ffr.DataViewService.DataView> Identifies the dataviews to be saved.

Return Value

This service returns a list of ID objects.

getDataViewMetadata

global static Map<String, ffr.CommonService.ObjectMetadata> getDataViewMetadata(Set<Id> dataViewIds)

Retrieves all the metadata required by the specified dataviews.

Input Parameters

Name Type Description
dataViewIds Set<Id> Identifies the dataviews of interest.

Return Value

This service returns a map of String, CommonService.ObjectMetadata objects.

getDataViewMetadata

global static Map<String, ffr.CommonService.ObjectMetadata> getDataViewMetadata(Set<Id> dataViewIds, Boolean throwException)

Retrieves all the metadata required by the specified dataviews.

Input Parameters

Name Type Description
dataViewIds Set<Id> Identifies the dataviews of interest.
throwException Boolean Indicates whether or not exceptions will be thrown.

Return Value

This service returns a map of String, CommonService.ObjectMetadata objects.

getAllFields

global static List<ffr.CommonService.Identity> getAllFields(Set<ID> dataviewIds)

Retrieves a list of all the fields on the specified dataviews.

Input Parameters

Name Type Description
dataviewIds Set<ID> Identifies the dataviews of interest.

Return Value

This service returns a list of CommonService.Identity objects.

deleteDataView

global static void deleteDataView(Set<Id> dataViewIds)

Deletes the specified dataviews.

Input Parameters

Name Type Description
dataViewIds Set<Id> Identifies the dataviews to be deleted.

getActionClasses

global static List<String> getActionClasses()

Input Parameters

Name Type Description

Return Value

getActionInstance

global static ffr.IActionViewsAction getActionInstance(String apexClassName)

Creates an instance of an action class.

Input Parameters

Name Type Description
apexClassName String The name of the class implementing the action.

Return Value

The action class instance.

getActionRequirements

global static Map<String, Set<Id>> getActionRequirements(ffr.DataViewService.DataView dataView)

Gets the fields required as inputs to each action on a dataview.

Input Parameters

Name Type Description
dataView ffr.DataViewService.DataView The dataView containing the actions.

Return Value

A map of required field Ids keyed by the action class name.

getCommonNamePicklistValues

global static List<ffr.CommonService.Picklist> getCommonNamePicklistValues()

Retrieves a list of all the common names for the org

Return Value

A list of CommonService.Picklist

getCommonNamePicklistValuesSet

global static Set<String> getCommonNamePicklistValuesSet()

Retrieves a set of all the common name values for the org

Return Value

The set of Common Names values as String

ffr.DataViewService.DataView

global class DataView

Holds a dataview. See "What is a Dataview?" in the FinancialForce Help for more details.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Name String The dataview's descriptive name.
StartingObject String The dataview's primary object.
Fields List<ffr.DataViewService.Field> Holds details of any fields added to the dataview.
Joins List<ffr.DataViewService.DataViewJoin> Holds details of any joins defined on the dataview.
Actions List<ffr.DataViewService.Action> Holds details of any actions defined on the dataview.
isSummarizedData Boolean

Methods

DataView

global DataView()

Creates an API version of an empty dataview object.

DataView

global DataView(ffr__DataView__c sObj)

Creates an API version of a dataview object using the specified parameters.

Input Parameters

Name Type Description
sObj ffr__DataView__c Contains the SObject version of the dataview object.

createSObject

global ffr__DataView__c createSObject()

Creates an SObject version of the dataview instance from its API version.

getActionById

global ffr.DataViewService.Action getActionById(Id actionId)

ffr.DataViewService.Field

global class Field

Holds details of a field that has been added to a dataview. See "What is a Dataview?" in the FinancialForce Help for more details.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Source String The source object that the field belongs to.
Name String The field name.
ObjectField String The system name for this field.
CommonName String The common name assigned to this field (if any).
AggregationMode String The type of aggregation to apply to fields on an aggregate join.
Presentable Boolean Indicates if the field is presentable.
Aggregatable Boolean When True, indicates that values can be aggregated. Only available for numeric fields. If you set this to True for an existing field which is in use on a summarization template, you might want to change the field's summarization method to SUM on the summarization template.
Reversible Boolean When True, indicates that values can be shown with reverse sign. Only available for numeric fields.
Selectable Boolean Indicates if the field is selectable.
TransposeItems List<ffr.DataViewService.TransposeItem> Holds transpose details for this field (if any).
InquiryTemplatesWhereIsInUse List<String> A list of action view templates that use this field.
SummarizationTemplatesWhereIsInUse Set<String> A list of summarization templates that use this field.
KeyPriority Integer Set to 1 if this field is the key field in the dataview. Otherwise set to 0.
ConvertCurrency Boolean When True, indicates that this value should be converted to the user currency. Only available for currency fields.
sourceID ID

Methods

Field

global Field()

Creates an API version of an empty dataview field object.

Field

global Field(ffr__DataViewField__c sObj)

Creates an API version of a dataview field object using the specified parameters.

Input Parameters

Name Type Description
sObj ffr__DataViewField__c Contains the SObject version of the dataview field object.

createSObject

global ffr__DataViewField__c createSObject()

Creates an SObject version of the dataview field instance from its API version.

ffr.DataViewService.TransposeItem

global class TransposeItem

Holds a transpose mapping of value to field.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Value String The value of the Transpose On field that you want to associate with a particular source object field.
Source String The source object containing the field that you want to associate with the specified value.
ObjectField String The object field that you want to associate with the specified value.

Methods

TransposeItem

global TransposeItem()

Creates an API version of an empty transpose item object.

TransposeItem

global TransposeItem(ffr__DataViewTransposeItem__c sObj)

Creates an API version of an empty transpose item object.

Input Parameters

Name Type Description
sObj ffr__DataViewTransposeItem__c Contains the SObject version of the transpose item object.

createSObject

global ffr__DataViewTransposeItem__c createSObject()

Creates an SObject version of the dataview transpose item instance from its API version.

ffr.DataViewService.DataViewJoin

global class DataViewJoin

Holds details of a dataview join. See "What is a Dataview?" in the FinancialForce Help for more details.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Name String The join name.
RelationshipName String The name that identifies the relationship between the two objects in Salesforce.
RelatedObject String Identifies the related object.
Depth Decimal Joins are displayed in an hierarchical tree structure. This indicates at what level in the tree structure this join exists.
Index Decimal A sequential number that identifies the join's position in the list.
Type String Indicates if the join is a lookup join or a relationship join.
ParentName String The name of the parent object.
Expanded Boolean Indicates whether or not the tree structure is expanded.
HasInvalidRelationship Boolean Indicates if the joined object has an invalid relationship with the parent.
Filters List<ffr.DataViewService.DataViewJoinFilter> Holds details of the join filter if one has been defined on the join.

Methods

DataViewJoin

global DataViewJoin()

Creates an API version of an empty dataview join object.

DataViewJoin

global DataViewJoin(ffr__DataViewJoin__c sObj, Schema.DescribeSObjectResult relatedObj)

Creates an API version of a dataview join object using the specified parameters.

Input Parameters

Name Type Description
sObj ffr__DataViewJoin__c Contains the SObject version of the dataview join object.
relatedObj Schema.DescribeSObjectResult The 'child' object in this join.

createSObject

global ffr__DataViewJoin__c createSObject()

Creates an SObject version of the dataview join instance from its API version.

ffr.DataViewService.DataViewJoinFilter

global class DataViewJoinFilter

Holds details of a join filter that has been applied to a relationship join. See "What is a Dataview?" in the FinancialForce Help for more details.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Name String System-generated name.
Operator String The operator to use in this condition.
Field String The field used in this condition.
FromValue String If the operator is In Range or Not in Range, this is the From Value to apply.
ToValue String The value to apply to the condition. If the operator is In Range or Not in Range, this is the To Value.
Prompt Boolean Indicates whether users will be prompted to supply a value at runtime.
OpeningBrackets Decimal The number of opening brackets.
ClosingBrackets Decimal The number of closing brackets.
CombineType String Indicates if this is an AND or OR condition.

Methods

DataViewJoinFilter

global DataViewJoinFilter()

Creates an API version of an empty dataview join filter object.

DataViewJoinFilter

global DataViewJoinFilter(ffr__DataViewJoinFilter__c sObj)

Creates an API version of a dataview join filter object using the specified parameters.

createSObject

global ffr__DataViewJoinFilter__c createSObject()

Creates an SObject version of the dataview join filter instance from its API version.

ffr.DataViewService.Action

global class Action

Holds details of an action that has been configured on a dataview. See "What is a Dataview?" in the FinancialForce Help for more details.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Name String The name given to the action.
ApexClass String
Description String The description given to the action.
Parameter String A parameter (optional) that needs to be passed to the Apex class that performs the action.
IsSingleSelect Boolean Indicates that only one row must be selected.
ParameterMetadataList List<ffr.DataViewService.ParameterMetadataType> Holds one or more parameters that the user needs to complete at runtime.

Methods

Action

global Action()

Creates an API version of an empty action object.

Action

global Action(ffr__DataViewAction__c sObj, Boolean singleSelect, List<ffr.DataViewService.ParameterMetadataType> metadataList)

Creates an API version of an action object using the specified parameters.

Input Parameters

Name Type Description
sObj ffr__DataViewAction__c Contains the SObject version of the action object.
singleSelect Boolean Indicates if this action is the type where only one row must be selected.
metadataList List<ffr.DataViewService.ParameterMetadataType> Holds any parameters that the user needs to complete at runtime.

createSObject

global ffr__DataViewAction__c createSObject()

Creates an SObject version of the dataview action instance from its API version.

ffr.DataViewService.SelectionOption

global class SelectionOption

Holds details of any selection options offered for a parameter.

Properties

Name Type Description
Key String A key to identify the selection option.
Label String A label for the selection option.

Methods

SelectionOption

global SelectionOption()

Creates an API version of an empty selection option object.

SelectionOption

global SelectionOption(String key, String label)

Creates an API version of an empty selection option object.

Input Parameters

Name Type Description
key String A key to identify the selection option.
label String A label for the selection option.

ffr.DataViewService.ParameterMetadataType

global class ParameterMetadataType

Holds a parameter that the user needs to complete at runtime when invoking an action from within Online Inquiries.

Properties

Name Type Description
Key String A key to identify the parameter.
Label String A label that informs the user what information he needs to supply.
Type String The datatype of the information that the user needs to supply.
Value String The parameter's value.
ReadOnly Boolean Indicates that the parameter is read-only.
SelectionOptions List<ffr.DataViewService.SelectionOption> Holds details of any selection options offered for the parameter.

Methods

ParameterMetadataType

global ParameterMetadataType()

Creates an API version of an empty parameter metadata object.

ParameterMetadataType

global ParameterMetadataType(String key, String label, String type)

Creates an API version of a parameter metadata object using the specified parameters.

Input Parameters

Name Type Description
key String A key to identify the parameter.
label String A label for the parameter.
type String The datatype of the parameter.

ParameterMetadataType

global ParameterMetadataType(String key, String label, String type, String value, Boolean readOnly, List<ffr.DataViewService.SelectionOption> selectionOptions)

Creates an API version of a parameter metadata object using the specified parameters.

Input Parameters

Name Type Description
key String A key to identify the parameter.
label String A label for the parameter.
type String The datatype of the parameter.
value String The parameter's value.
readOnly Boolean Indicates if the parameter is read-only.
selectionOptions List<ffr.DataViewService.SelectionOption> Holds any selection options offered for the parameter.

ffr.DataViewService.CommonNamePicklistField

global class CommonNamePicklistField

Holds the object and field names of a common name picklist

Properties

Name Type Description
ObjectName String The name of the object that owns the common name picklist field
FieldName String The name of the common name picklist field

Methods

CommonNamePicklistField

global CommonNamePicklistField()

Creates an API version of an empty Common Name Picklist object.

CommonNamePicklistField

global CommonNamePicklistField(String objectName, String fieldName)

Creates an API version of an empty Common Name Picklist object using the specified parameters.

Input Parameters

Name Type Description
objectName String A object name for the parameter.
fieldName String The field name for the parameter.
© Copyright 2009–2018 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.