Accounting API Developer's Reference

c2g.OnlineInquiriesService

global with sharing class OnlineInquiriesService

The service class relating to Online Inquiries.

Enums

MessageLevel

The type of status message returned by the action.

Value Description
ERROR Status message of error.
SUCCESS Status message of success.
WARNING Status message of warning.

Methods

hasPrompts

global static Boolean hasPrompts(List<c2g.InquiryTemplateService.InquiryTemplateFilter> filterList)

This service returns a Boolean indicating whether or not each of the specified filter criteria is set to prompt.

Input Parameters

Name Type Description
filterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filters (selection rule) that determine what data is retrieved.

Return Value

This service returns a Boolean object.

hasPrompts

global static Boolean hasPrompts(c2g.InquiryTemplateService.InquiryTemplate template)

This service returns a Boolean indicating whether or not the specified inquiry template has criteria set to prompt.

Input Parameters

Name Type Description
template c2g.InquiryTemplateService.InquiryTemplate The inquiry template you are interested in.

Return Value

This service returns a Boolean object.

getData

global static c2g.SelectionService.Result getData(c2g.InquiryTemplateService.InquiryTemplate template)

Gets data for the template provided

getData

global static c2g.SelectionService.Result getData(Id dataviewId, List<Id> fieldList, List<c2g.InquiryTemplateService.InquiryTemplateFilter> filterList)

Retrieves the data that is returned when you run an online inquiry using the specified parameters.

Input Parameters

Name Type Description
dataviewId Id Identifies the dataview used by this online inquiry.
fieldList List<Id> Identifies the fields that you want to be returned.
filterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filters (selection rule) that determine what data is retrieved.

Return Value

This service returns a SelectionService.Result object.

getDrillData

global static c2g.OnlineInquiriesService.DrillData getDrillData(ID destinationTemplateId, List<c2g.InquiryTemplateService.InquiryTemplateFilter> currentfilterList)

Retrieves data that matches the specified filter and presents it using the specified template. In the Online Inquiries user interface, this is equivalent to selecting a different inquiry template from the drop-down list above the results grid.

Input Parameters

Name Type Description
destinationTemplateId ID The inquiry template you want to use to display the drill data.
currentfilterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filters (selection rule) that determine what data is retrieved.

Return Value

This service returns a c2g.OnlineInquiriesService.DrillData object.

getDrillData

global static c2g.OnlineInquiriesService.DrillData getDrillData(ID sourceTemplateID, ID destinationTemplateID, List<c2g.InquiryTemplateService.InquiryTemplateFilter> currentfilterList, Map<String, String> drillContext)

Retrieves data that provides further analysis relating to the specified drill context. In the Online Inquiries user interface, this is equivalent to left-clicking or right-clicking on a cell to drill.

Input Parameters

Name Type Description
sourceTemplateID ID The dataview used by the initial online inquiry.
destinationTemplateID ID The inquiry template you want to use to display the drill data.
currentfilterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filters (selection rule) that determine what data is retrieved.
drillContext Map<String, String> The selection context that determines the drill data results. This is a list of common names and values. For example, if the common names are Account and Currency the drill context string could be: Account, OfficeSuppliesUK, Currency, GBP

Return Value

This service returns a c2g.OnlineInquiriesService.DrillData object.

getDrillData

global static c2g.OnlineInquiriesService.DrillData getDrillData(ID sourceTemplateID, ID destinationTemplateID, List<c2g.InquiryTemplateService.InquiryTemplateFilter> currentfilterList, List<c2g.InquiryTemplateService.InquiryTemplateFilter> columnFilters, Map<String, String> drillContext)

Applies column filters when doing a drill to ensure that the drill results are specific to the value in the filtered column (rather than including values across the whole row).

Input Parameters

Name Type Description
sourceTemplateID ID The dataview used by the initial online inquiry.
destinationTemplateID ID The inquiry template you want to use to display the drill data.
currentfilterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filters (selection rule) that determine what data is retrieved.
columnFilters List<c2g.InquiryTemplateService.InquiryTemplateFilter> The column filters (if any) that determine what data is displayed in a particular column.
drillContext Map<String, String> The selection context that determines the drill data results. This is a list of common names and values. For example, if the common names are Account and Currency the drill context string could be: Account, OfficeSuppliesUK, Currency, GBP

Return Value

This service returns a c2g.OnlineInquiriesService.DrillData object.

getDrillData

global static c2g.OnlineInquiriesService.DrillData getDrillData(ID sourceTemplateID, ID destinationTemplateID, List<c2g.InquiryTemplateService.InquiryTemplateFilter> currentfilterList, List<c2g.InquiryTemplateService.InquiryTemplateFilter> columnFilters, List<c2g.InquiryTemplateService.InquiryTemplateFilter> summarizationTemplateFilterList, Map<String, String> drillContext)

Applies column filters when doing a drill to ensure that the drill results are specific to the value in the filtered column (rather than including values across the whole row).

Input Parameters

Name Type Description
sourceTemplateID ID The dataview used by the initial online inquiry.
destinationTemplateID ID The inquiry template you want to use to display the drill data.
currentfilterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filters (selection rule) that determine what data is retrieved.
columnFilters List<c2g.InquiryTemplateService.InquiryTemplateFilter> The column filters (if any) that determine what data is displayed in a particular column.
summarizationTemplateFilterList List<c2g.InquiryTemplateService.InquiryTemplateFilter> The filter (if any) taken from the summarization template
drillContext Map<String, String> The selection context that determines the drill data results. This is a list of common names and values. For example, if the common names are Account and Currency the drill context string could be: Account, OfficeSuppliesUK, Currency, GBP

Return Value

This service returns a c2g.OnlineInquiriesService.DrillData object.

getPersonalSettingsForTemplateAndUser

global static c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting getPersonalSettingsForTemplateAndUser(Id templateId)

Retrieves the personal settings that have been saved by the current user for the specified inquiry template.

Input Parameters

Name Type Description
templateId Id Identifies the inquiry template that the personal settings have been saved for.

Return Value

This service returns a c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting object.

savePersonalSettings

global static c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting savePersonalSettings(c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting settingsDTO)

Saves the specified personal settings.

Input Parameters

Name Type Description
settingsDTO c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting Holds the personal settings that will be saved.

Return Value

This service returns a c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting object.

deletePersonalSetting

global static void deletePersonalSetting(Id templateId)

Deletes the personal settings that have been saved by the current user for the specified inquiry template.

Input Parameters

Name Type Description
templateId Id Identifies the inquiry template that the personal settings were saved for.

invokeAction

global static c2g.OnlineInquiriesService.ActionResult invokeAction(Id dataviewId, Id actionId, c2g.SelectionService.Result selectedData, Map<String, String> promptValues)

Invokes an online inquiries action using the specified parameters.

Input Parameters

Name Type Description
dataviewId Id The dataview where the action is defined.
actionId Id The action that will be invoked.
selectedData c2g.SelectionService.Result Identifies the rows that the action is going to be performed on.
promptValues Map<String, String> A list of label-value pairs that need to be supplied for the action to run.

Return Value

This service returns a c2g.OnlineInquiriesService.ActionResult object.

Validate

global static c2g.OnlineInquiriesService.ValidationResult Validate(Id dataviewId, Id actionId, c2g.SelectionService.Result selectedData)

Verifies whether the specified action is valid for the selected data.

Input Parameters

Name Type Description
dataviewId Id Identifies the dataview used by the online inquiry.
actionId Id Identifies the action being validated.
selectedData c2g.SelectionService.Result Identifies the rows that the action is being validated for.

Return Value

This service returns a c2g.OnlineInquiriesService.ValidationResult object.

c2g.OnlineInquiriesService.DrillData

global class DrillData

Holds information used when drilling within Online Inquiries.

Properties

Name Type Description
Result SelectionService. The drill results.
Template Inquiry The inquiry template used to display the drill results.
FilterUsed List<c2g.InquiryTemplateService.InquiryTemplateFilter> The selection query used to retrieve the drill results.

c2g.OnlineInquiriesService.OnlineInquiriesPersonalSetting

global class OnlineInquiriesPersonalSetting

Argument object sent by client

Properties

Name Type Description
Id Id Globally unique string that identifies the record.
InquiryTemplateId Id Identifies the inquiry template that these settings relate to.
Settings List<c2g.OnlineInquiriesService.OnlineInquiriesSetting> Holds key-value pairs of the personal settings that have been saved.

Methods

OnlineInquiriesPersonalSetting

global OnlineInquiriesPersonalSetting()

Creates an API version of an empty online inquiries personal setting object.

Return Value

This constructor does not return a value.

OnlineInquiriesPersonalSetting

global OnlineInquiriesPersonalSetting(c2g__OnlineInquiriesPersonalSetting__c sObj, List<c2g.OnlineInquiriesService.OnlineInquiriesSetting> settingsList)

Creates an API version of an empty online inquiries personal setting object.

Input Parameters

Name Type Description
sObj c2g__OnlineInquiriesPersonalSetting__c Contains the SObject version of the personal setting object.
settingsList List<c2g.OnlineInquiriesService.OnlineInquiriesSetting> A list of key-value pairs for the personal settings to be held by the object.

Return Value

This constructor does not return a value.

createSObject

global c2g__OnlineInquiriesPersonalSetting__c createSObject(String settingResult)

Creates an SObject version of the online inquiry personal setting instance from its API version.

Input Parameters

Name Type Description
settingResult String The string that contains the setting as one or more key-value pairs.

Return Value

This service returns an OnlineInquiriesPersonalSetting__c object.

c2g.OnlineInquiriesService.OnlineInquiriesSetting

global class OnlineInquiriesSetting

Holds a key-value pair storing a personal setting that has been saved by a user choosing Remember My Settings from within Online Inquiries.

Properties

Name Type Description
Key String A key that identifies the personal setting that has been saved.
Value String The value saved for this key.

c2g.OnlineInquiriesService.ActionResult

global class ActionResult

The result of running an action within Online Inquiries.

Properties

Name Type Description
StatusMessage String The message returned by the action.
StatusCategory c2g.OnlineInquiriesService.MessageLevel The type of message returned by the action: Success, Error, Warning.
RequiresRefresh Boolean Indicates whether a screen refresh is required.

c2g.OnlineInquiriesService.ValidationResult

global class ValidationResult

The result (success or failure) of validating an action within Online Inquiries.