Foundations Apex API Developer Reference

fferpcore.CompanyService

global with sharing class CompanyService

Services for companies.

Methods

loadCompaniesWithoutTaxInformation

global static List<fferpcore.CompanyService.CompanySummary> loadCompaniesWithoutTaxInformation()

Retrieve the summaries of all companies whose tax information has not been set.

Exceptions Thrown

Value Description
Exceptions.PermissionException An exception is thrown if the user does not have access to the objects and fields that are necessary to retrieve companies.

Return Value

The list of company summaries.

addTaxInformation

global static fferpcore.CompanyService.AddTaxInformationResponse addTaxInformation(List<fferpcore.CompanyService.AddTaxInformationRequest> requests)

Assign tax information to companies by setting a value in their Tax Information field. You can only assign tax information to companies that do not have any. A single tax information record can be assigned to many companies, but each company can only have one tax information record.

Input Parameters

Name Type Description
requests List<fferpcore.CompanyService.AddTaxInformationRequest> Containing the parameters for assigning tax information to companies.

Exceptions Thrown

Value Description
Exceptions.InvalidArgumentException An exception is thrown if any of the requests are null.
Exceptions.PermissionException An exception is thrown if the user does not have access to the objects and fields that are necessary to assign tax information.
Exceptions.CompanyException An exception is thrown if any of the tax information assignments are invalid.
System.DmlException An exception is thrown if the database operation to update companies fails.

Return Value

A placeholder response object, reserved for future use. This does not currently contain any information.

fferpcore.CompanyService.CompanySummary

global class CompanySummary

A summary of the identifying information of a company record.

Properties

Name Type Description
Id Id Read only. The company ID.
Name String Read only. The company name.

Methods

CompanySummary

global CompanySummary(Id id, String name)

Constructs a company summary with the specified ID and Name.

Input Parameters

Name Type Description
id Id The ID of the company record. This will be assigned to the Id property on the created summary.
name String The name of the company record. This will be assigned to the Name property on the created summary.

fferpcore.CompanyService.AddTaxInformationRequest

global class AddTaxInformationRequest

A request to assign a specified company tax information record to a specified company. A list of these is used when calling addTaxInformation.

Properties

Name Type Description
CompanyId Id Required. The company ID. This must be unique among all the requests sent in a single call to addTaxInformation.
TaxInformationId Id Required. The company tax information ID.

Methods

AddTaxInformationRequest

global AddTaxInformationRequest()

Constructs an empty request.

AddTaxInformationRequest

global AddTaxInformationRequest(Id companyId, Id taxInformationId)

Constructs a request to assign the specified tax information to the specified company.

Input Parameters

Name Type Description
companyId Id The ID of the company to have the tax information assigned to it. This populates the CompanyId property of the constructed request.
taxInformationId Id The ID of the tax information record to be assigned to the company. This populates the TaxInformationId property of the constructed request.

fferpcore.CompanyService.AddTaxInformationResponse

global class AddTaxInformationResponse

The result of adding tax information to companies. This currently contains no information, but is reserved for future use.

Methods

AddTaxInformationResponse

global AddTaxInformationResponse()

Constructs an empty response.

© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.