Accounting API Developer's Reference

c2g.InquiryTemplateService

global with sharing class InquiryTemplateService

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

Methods

load

global static List<c2g.InquiryTemplateService.InquiryTemplate> load(set<ID> ids)

Loads the specified inquiry templates.

Input Parameters

Name Type Description
ids set<ID> Identifies the inquiry templates to be loaded.

Return Value

This service returns a list of c2g.InquiryTemplateService.InquiryTemplate objects.

save

global static List<c2g.InquiryTemplateService.InquiryTemplate> save(List<c2g.InquiryTemplateService.InquiryTemplate> templates)

Saves the specified inquiry templates. The rules here are that all fields must be provided as they are to be saved. This means that nulls will be saved as null, potentially wiping any previous value, i.e. partial updates are not supported. Also all child records (the InquiryTemplateColumns and InquiryTemplateFilters) must also be provided with all fields set, any existing child records not in this list will be deleted. The order of InquiryTemplateFilters is preserved on save.

Return Value

This service returns a list of the saved c2g.InquiryTemplateService.InquiryTemplate objects.

getAvailableForExport

global static List<c2g.InquiryTemplateService.InquiryTemplateBaggage> getAvailableForExport()

Returns a list of inquiry templates and dataviews, as baggage descriptors, that are available for export, one for each template available for export. Each baggage descriptor describes the template and its direct dependancies.

Return Value

This service returns a list of c2g.InquiryTemplateService.InquiryTemplateBaggage objects for available templates.

exportBag

global static c2g.InquiryTemplateService.InquiryTemplateBag exportBag(Set<Id> templatesToExport)

Exports the specified inquiry templates and associated records for running action views. All IDs are removed as they are not Org portable (references are by name).

Input Parameters

Name Type Description
templatesToExport Set<Id> Identifies the inquiry templates to export.

Return Value

This service returns a c2g.InquiryTemplateService.InquiryTemplateBag object.

importBag

global static c2g.InquiryTemplateService.InquiryTemplateImportsIgnored importBag(c2g.InquiryTemplateService.InquiryTemplateBag bag)

Imports the inquiry templates and associated records in the specified bag. Any which already exist are ignored. No IDs should be present, so all references are resolved by name.

Input Parameters

Name Type Description
bag c2g.InquiryTemplateService.InquiryTemplateBag Contains the items you want to import.

Return Value

This service returns a c2g.InquiryTemplateService.InquiryTemplateImportsIgnored object containing any imports which were ignored (because they already existed).

c2g.InquiryTemplateService.InquiryTemplate

global class InquiryTemplate

Holds an inquiry template. See "What is an Inquiry Template?" in the FinancialForce Help for more details.

Properties

Name Type Description
TemplateId Id Globally unique string that identifies the record.
TemplateName String The template name.
TemplateColumns List<c2g.InquiryTemplateService.InquiryTemplateColumn> Holds details of any columns defined on the inquiry template.
TemplateFilters List<c2g.InquiryTemplateService.InquiryTemplateFilter> Holds details of the selection rule defined on the inquiry template
TemplateSignFilters List<c2g.InquiryTemplateService.InquiryTemplateSignFilter> Holds details of any reverse sign rules defined on the inquiry template.
TemplateSortItems List<c2g.InquiryTemplateService.InquiryTemplateSortItem> Holds details of any sorting rules defined on the inquiry template.
TemplateExcludedActions List<c2g.InquiryTemplateService.InquiryTemplateExcludedAction> Holds details of any actions that the inquiry template excludes from the list of actions available to be performed at runtime.
TemplateCommonNames List<c2g.InquiryTemplateService.InquiryTemplateCommonName> Holds details of any common name overrides on the inquiry template.
Dataview c2g.CommonService.Identity The dataview used by this inquiry template.
SummarizeDuplicateRows Boolean Select to aggregate rows where all the information is the same. Duplicate rows are rolled up into one summary row, and any columns where Mode=SUM are summed.
LedgerSettings c2g.InquiryTemplateService.InquiryTemplate Holds settings that are useful when the inquiry template is being used to inquire on ledger data.
SummarizationTemplateId Id Identifies the summarization template to use if inquiring on summarized data.
SummarizationTemplateName String The name of the summarization template to use if inquiring on summarized data.

Methods

InquiryTemplate

global InquiryTemplate()

Creates an API version of an empty inquiry template object.

InquiryTemplate

global InquiryTemplate(c2g__InquiryTemplate__c sObj, c2g.CommonService.Identity view)

Creates an API version of an inquiry template object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplate__c Contains the SObject version of the inquiry template object.
view c2g.CommonService.Identity Identifies the dataview on which the inquiry template is based.

createSObject

global c2g__InquiryTemplate__c createSObject()

Creates an SObject version of the inquiry template instance from its API version.

c2g.InquiryTemplateService.InquiryTemplateColumn

global class InquiryTemplateColumn

Holds details of a column defined on an inquiry template. See "What is an Inquiry Template?" in the FinancialForce Help for more details.

Properties

Name Type Description
ColumnId Id Globally unique string that identifies the record.
DisplayName String The title of this column. This will be displayed as the column title in the results grid.
DisplayOrder Decimal The order in which this column will be displayed in the results grid.
Field c2g.CommonService.Identity The field that this column contains.
Mode String If this column contains a numeric field, set this to SUM for values to be summed in subtotal and grand total rows. Leave blank if you do not want values to be summed.
Type String The column type: field, formula or count.
ValueType String The values for the field that you are transposing on.
ColumnFilters List<c2g.InquiryTemplateService.InquiryTemplateColumnFilter> Holds details of any filter defined on the column.
ColumnWidth Decimal The width of the column.
Formula String If this column contains a formula, the formula is defined here. Note that: 1) Formula is a string to allow for future flexibility; 2) Currently, a formula must be two operands and an operator, and cannot include parenthesis; 3) Fields are included by using the field id surrounded by square brackets; 4) Valid operators are + - / *; 5) Spaces are ignored; 6) Numbers are validated using Decimal.valueOf(), so commas within numbers are not valid; 7) Do not use any special characters such as new lines; 8) Examples of valid formulae: 1+2.5; [field.id]*3; [field1.id]/[field2.id
CalculateFormulaOnSummary Boolean Select to have the formula reapplied across subtotal and grand total rows, and aggregated rows.
FormulaDp Decimal The number of decimal places to use when displaying values in this column.
ColumnFormula List<c2g.InquiryTemplateService.InquiryTemplate Holds details of any formula defined on the column.
DecimalPlaces Decimal The number of decimal places that values in this column will be displayed to.
Scaling String The scaling rule to apply to large numbers.
NegativeNumberFormat String Indicates how negative numbers will be displayed in this column.
ShowNumberSeparators Boolean Indicates whether thousand separators are displayed.
Condition String The operator to use if setting conditional formatting on values in this column.
ConditionValue String The value to apply to the condition.
ConditionToValue String If the condition uses the In Range or Not In Range operator, this is the To value to use with the operator.
ConditionFalseTextColor String The text color to apply if the value in the column does not match the condition.
ConditionFalseFillColor String The fill color to apply if the value in the column does not match the condition.
ConditionTrueTextColor String The text color to apply if the value in the column matches the condition.
ConditionTrueFillColor String The fill color to apply if the value in the column matches the condition.
NegativeTextColor String The text color to apply to values that do not match the condition.
NegativeFillColor String The fill color to apply to values that do not match the condition.
PositiveTextColor String The text color to apply to values that match the condition.
PositiveFillColor String The fill color to apply to values that match the condition.
Drill c2g.CommonService.Identity The drill inquiry template associated with this column (if any).
TransposeDrills List<c2g.InquiryTemplateService.InquiryTemplateTransposeDrill> Holds details of the drill templates to use with different transposed values.
TransposeSwitchFieldId Id The field that you are transposing on.

Methods

InquiryTemplateColumn

global InquiryTemplateColumn()

Creates an API version of an empty inquiry template column object.

InquiryTemplateColumn

global InquiryTemplateColumn(c2g__InquiryTemplateColumn__c sObj, c2g.CommonService.Identity aField, c2g.CommonService.Identity aDrill)

Creates an API version of an inquiry template column object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateColumn__c Contains the SObject version of the inquiry template column object.
aField c2g.CommonService.Identity Identifies the field displayed in this column.
aDrill c2g.CommonService.Identity Identifies the inquiry template that will be used if drilling on values in this column.

createSObject

global c2g__InquiryTemplateColumn__c createSObject()

Creates an SObject version of the inquiry template instance from its API version.

Return Value

This service returns an InquiryTemplateColumn__c object.

c2g.InquiryTemplateService.InquiryTemplateCommonName

global class InquiryTemplateCommonName

Holds details of a common name override set on an inquiry template column.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Field c2g.CommonService.Identity The field on which the common name has been overridden.
Name String The common name to use on this column.

Methods

InquiryTemplateCommonName

global InquiryTemplateCommonName()

Creates an API version of an empty inquiry template common name object.

InquiryTemplateCommonName

global InquiryTemplateCommonName(c2g__InquiryTemplateCommonName__c sObj)

Creates an API version of an inquiry template common name object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateCommonName__c Contains the SObject version of the inquiry template common name object.

createSObject

global c2g__InquiryTemplateCommonName__c createSObject()

Creates an SObject version of the inquiry template common name instance from its API version.

Return Value

This service returns an InquiryTemplateCommonName__c object.

c2g.InquiryTemplateService.InquiryTemplateFilter

global class InquiryTemplateFilter

Holds details of the selection rule defined on an inquiry template. See "What is an Inquiry Template?" in the FinancialForce Help for more details.

Properties

Name Type Description
FilterId 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

InquiryTemplateFilter

global InquiryTemplateFilter()

Creates an API version of an empty inquiry template filter object.

InquiryTemplateFilter

global InquiryTemplateFilter(c2g__InquiryTemplateFilter__c sObj, c2g.CommonService.Identity theField)

Creates an API version of an inquiry template filter object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateFilter__c Contains the SObject version of the inquiry template filter object.
theField c2g.CommonService.Identity Identifies the field to which this filter applies.

createSObject

global c2g__InquiryTemplateFilter__c createSObject(Id fieldId)

Creates an SObject version of the inquiry template filter instance from its API version.

Input Parameters

Name Type Description
fieldId Id Identifies the field to which the filter applies.

Return Value

This service returns an InquiryTemplateFilter__c object.

c2g.InquiryTemplateService.InquiryTemplateColumnFilter

global class InquiryTemplateColumnFilter

Creates an API version of an empty inquiry template filter object.

Properties

Name Type Description
FilterId 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

InquiryTemplateColumnFilter

global InquiryTemplateColumnFilter()

Creates an API version of an empty inquiry template column filter object.

InquiryTemplateColumnFilter

global InquiryTemplateColumnFilter(c2g__InquiryTemplateColumnFilter__c sObj, c2g.CommonService.Identity theField)

Creates an API version of an inquiry template column filter object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateColumnFilter__c Contains the SObject version of the inquiry template column filter object.
theField c2g.CommonService.Identity Identifies the field to which the filter is applied.

createSObject

global c2g__InquiryTemplateColumnFilter__c createSObject(Id fieldId)

Creates an SObject version of the inquiry template column filter instance from its API version.

Input Parameters

Name Type Description
fieldId Id Identifies the field to which the column filter applies.

Return Value

This service returns an InquiryTemplateColumnFilter__c object.

c2g.InquiryTemplateService.InquiryTemplateColumnFormula

global class InquiryTemplateColumnFormula

Holds details of the formula defined on an inquiry template column. See "Building Formulae for use in Action Views" in the FinancialForce Help for more details.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
Operator String The operator to use in this formula.
LiteralValue Decimal A literal value used in the formula.
SourceColumn String The name of a presentable column used in the formula.
SourceColumnId Id Unique ID that identifies the presentable column.
SourceField String The name of a field used in the formula.
SourceFieldId Id Unique ID that identifies the field.
OpeningBrackets Decimal The number of opening brackets.
ClosingBrackets Decimal The number of closing brackets.

Methods

InquiryTemplateColumnFormula

global InquiryTemplateColumnFormula()

Creates an API version of an empty inquiry template column formula object.

InquiryTemplateColumnFormula

global InquiryTemplateColumnFormula(c2g__InquiryTemplateColumnFormula__c sObj)

Creates an API version of an inquiry template column formula object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateColumnFormula__c Contains the SObject version of the inquiry template column formula object.

createSObject

global c2g__InquiryTemplateColumnFormula__c createSObject()

Creates an SObject version of the inquiry template column formula instance from its API version.

c2g.InquiryTemplateService.InquiryTemplateSignFilter

global class InquiryTemplateSignFilter

Holds details of the reverse sign rule defined on an inquiry template. See "What is an Inquiry Template?" in the FinancialForce Help for more details.

Properties

Name Type Description
FilterId 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

InquiryTemplateSignFilter

global InquiryTemplateSignFilter()

Creates an API version of an empty inquiry template sign filter object.

InquiryTemplateSignFilter

global InquiryTemplateSignFilter(c2g__InquiryTemplateSignFilter__c sObj, c2g.CommonService.Identity theField)

Creates an API version of an inquiry template sign filter object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateSignFilter__c Contains the SObject version of the inquiry template sign filter object.
theField c2g.CommonService.Identity Identifies the field to which this filter applies.

createSObject

global c2g__InquiryTemplateSignFilter__c createSObject(Id fieldId)

Creates an SObject version of the inquiry template sign filter instance from its API version.

Input Parameters

Name Type Description
fieldId Id Identifies the field to which the sign filter applies.

Return Value

This service returns an InquiryTemplateSignFilter__c object.

c2g.InquiryTemplateService.InquiryTemplateSortItem

global class InquiryTemplateSortItem

Holds details of sorting and grouping options defined on an inquiry template.

Properties

Name Type Description
Id Id Unique ID that identifies the column.
Column String The column to sort by.
ColumnId Id Unique ID that identifies the column.
Order String The sort order.
GroupBy Boolean Indicates whether or not to group by this column.
HideDetails Boolean If GroupBy is True, choose whether or not to hide the details listed for each group. When True, only a subtotal row is displayed for each group.

Methods

InquiryTemplateSortItem

global InquiryTemplateSortItem()

Creates an API version of an empty inquiry template sort item object.

InquiryTemplateSortItem

global InquiryTemplateSortItem(c2g__InquiryTemplateSortItem__c sObj)

Creates an API version of an inquiry template sort item object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateSortItem__c Contains the SObject version of the inquiry template sort item object.

createSObject

global c2g__InquiryTemplateSortItem__c createSObject()

Creates an SObject version of the inquiry template sort item instance from its API version.

Return Value

This service returns an InquiryTemplateSortItem__c object.

c2g.InquiryTemplateService.InquiryTemplateLedgerSettings

global class InquiryTemplateLedgerSettings

Holds settings that are useful when the inquiry template is being used to inquire on ledger data.

Properties

Name Type Description
ShowDocumentCount Boolean When True, shows document counts for filtered columns when duplicate rows are aggregated in the action view results.
ColumnFilterDrill Boolean When True, ensures that when drilling on a filtered column the drill results are specific to the value in the filtered column. When False, the drill results include values across the whole row.

Methods

InquiryTemplateLedgerSettings

global InquiryTemplateLedgerSettings(Boolean showDocumentCount, Boolean columnFilterDrill)

Creates an API version of an inquiry template ledger settings object using the specified parameters.

Input Parameters

Name Type Description
showDocumentCount Boolean When True, document counts are shown for filtered columns when duplicate rows are aggregated in the action view results.
columnFilterDrill Boolean When True, ensures that when drilling on a filtered column the drill results are specific to the value in the filtered column. When False, the drill results include values across the whole row.

c2g.InquiryTemplateService.InquiryTemplateExcludedAction

global class InquiryTemplateExcludedAction

Holds details of an action that the inquiry template excludes from the list of actions available to be performed at runtime.

Properties

Name Type Description
Id Id Identifies the excluded action.
DataViewActionId Id Globally unique string that identifies the record.

Methods

InquiryTemplateExcludedAction

global InquiryTemplateExcludedAction()

Creates an API version of an empty inquiry template excluded action object.

InquiryTemplateExcludedAction

global InquiryTemplateExcludedAction(c2g__InquiryTemplateExcludedAction__c sObj)

Creates an API version of an empty inquiry template excluded action object.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateExcludedAction__c Creates an API version of an inquiry template excluded action object using the specified parameters.

createSObject

global c2g__InquiryTemplateExcludedAction__c createSObject(Id DataViewActionId)

Creates an SObject version of the inquiry template excluded action instance from its API version.

Input Parameters

Name Type Description
DataViewActionId Id Identifies the excluded action.

Return Value

This service returns an InquiryTemplateExcludedAction__c object.

c2g.InquiryTemplateService.InquiryTemplateTransposeDrill

global class InquiryTemplateTransposeDrill

Holds details of the drill template to use for each value of a transposed field in an inquiry template column.

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
TransposeItemValue String The transpose value that the specified drill inquiry template relates to.
Field c2g.CommonService.Identity The field to which these drill inquiry templates apply.
DrillTemplate c2g.CommonService.Identity The drill inquiry template to use for the specified transposed value.

Methods

InquiryTemplateTransposeDrill

global InquiryTemplateTransposeDrill()

Creates an API version of an empty inquiry template transpose drill object.

InquiryTemplateTransposeDrill

global InquiryTemplateTransposeDrill(c2g__InquiryTemplateTransposeDrill__c sObj, c2g.CommonService.Identity fieldIdentity, c2g.CommonService.Identity drillTemplateIdentity)

Creates an API version of an inquiry template transpose drill object using the specified parameters.

Input Parameters

Name Type Description
sObj c2g__InquiryTemplateTransposeDrill__c Contains the SObject version of the inquiry template transpose drill object.
fieldIdentity c2g.CommonService.Identity Identifies the field being transposed.
drillTemplateIdentity c2g.CommonService.Identity Identifies the drill inquiry template.

createSObject

global c2g__InquiryTemplateTransposeDrill__c createSObject()

Creates an SObject version of the inquiry template transpose drill instance from its API version.

c2g.InquiryTemplateService.InquiryTemplateBaggage

global class InquiryTemplateBaggage

Holds a list of inquiry templates and dataviews that are available for export.

Properties

Name Type Description
Template c2g.CommonService.Identity Identifies an inquiry template available for export.
SummarizationTemplate c2g.CommonService.Identity Identifies a summarization template available for export.
SummarizationTemplateDataview c2g.CommonService.Identity Identifies a dataview, with a summarization object as its primary source object, available for export.
Dataview c2g.CommonService.Identity Identifies a dataview available for export.
DependantTemplates List<c2g.CommonService.Identity> A list of dependent templates.
DependantRcps List<c2g.CommonService.Identity> A list of dependent related content panes.

Methods

InquiryTemplateBaggage

global InquiryTemplateBaggage()

Creates an API version of an empty inquiry template baggage object.

c2g.InquiryTemplateService.InquiryTemplateBag

global class InquiryTemplateBag

Holds inquiry templates and associated records that you are exporting from one organization and importing into another organization.

Properties

Name Type Description
Selected List<String> Lists the records selected for transfer from one organization to another.
Templates List<c2g.InquiryTemplateService.InquiryTemplate> The list of inquiry templates in the bag.
SummarizationTemplates List<c2g.SummarizationService.SummarizationTemplate> The list of summarization templates in the bag.
Dataviews List<c2g.DataViewService.DataView> The list of dataviews in the bag.
Rcps List<RelatedContentPaneService.Pane> The list of related content panes in the bag.
FFAVersion Decimal The version of FinancialForce Accounting used to create the bag.

Methods

InquiryTemplateBag

global InquiryTemplateBag()

Creates an API version of an empty inquiry template bag object.

c2g.InquiryTemplateService.InquiryTemplateImportsIgnored

global class InquiryTemplateImportsIgnored

Holds details of any dataviews, inquiry templates and summarization templates that were ignored by the import process. This happens when a dataview, inquiry template or summarization template with the same name already exists in the organization.

Properties

Name Type Description
Template List<c2g.CommonService.Identity> Identifies inquiry templates that were ignored by the import process.
Dataview List<c2g.CommonService.Identity> Identifies dataviews that were ignored by the import process.
RelatedContentPane List<c2g.CommonService.Identity> Identifies related content panes that were ignored by the import process.
SummarizationTemplate List<c2g.CommonService.Identity> Identifies summarization templates that were ignored by the import process.

Methods

InquiryTemplateImportsIgnored

global InquiryTemplateImportsIgnored()

Creates an API version of an empty inquiry template imports ignored object.