c2g.TransactionServiceglobal with sharing class TransactionService The service class relating to Transactions. EnumsTransactionTypeThe list of valid options for a transaction type.
TransactionLineTypeThe list of valid options for a transaction line type.
Methods
reverseTransactionIdsglobal static List<Id> reverseTransactionIds(List<c2g.TransactionService.ReverseTransactionInfo> reverseTransactionInfoList) Returns the list of IDs for new reverse allocation transactions. Use ReverseTransactions (Reverse Transactions) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns a list of Id objects. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. c2g.TransactionService.ReverseTransactionInfo reverseTransactionInfo = new c2g.TransactionService.ReverseTransactionInfo(); reverseTransactionInfo.OriginalTransactionId = 'a2124000000TjIP'; reverseTransactionInfo.ReversePeriodId = 'a1f24000000PdIK'; reverseTransactionInfo.ReverseReason = 'Reverse Reason'; reverseTransactionInfo.ReverseTransactionDate = System.today(); List<Id> reverseTransactionIdList = c2g.TransactionService.reverseTransactionIds(List<c2g.TransactionService.ReverseTransactionInfo>{reverseTransactionInfo}); postglobal static List<Id> post(List<c2g.TransactionService.AccountingTransaction> accountingTransactions, c2g.TransactionService.PostOptions postOptions) Creates and inserts the transactions according to the given list of Accounting Transactions. Input Parameters
Return ValueThe list of IDs for new posted transactions. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. c2g.TransactionService.AccountingTransaction accountingTransaction = new c2g.TransactionService.AccountingTransaction(); accountingTransaction.setTransactionDate(System.today()); accountingTransaction.setPeriodId('a2k36000001lLk4'); accountingTransaction.setTransactionType(c2g.TransactionService.TransactionType.JOURNAL); c2g.TransactionService.AccountingTransactionLine accountingTransactionLine1 = new c2g.TransactionService.AccountingTransactionLine(); accountingTransactionLine1.setDocumentCurrencyId('a1W360000015OvB'); accountingTransactionLine1.setDocumentValue(100.00); accountingTransactionLine1.setDueDate(System.today()); accountingTransactionLine1.setGeneralLedgerAccountId('a2B36000000BCZh'); accountingTransactionLine1.setLineDescription('Line1 Description'); accountingTransactionLine1.setLineReference('Line1 Reference'); accountingTransactionLine1.setLineType(c2g.TransactionService.TransactionLineType.ANALYSIS); accountingTransactionLine1.setFieldValue('MyCustomTextField__c', 'ABC'); accountingTransaction.TransactionLineItems.add(accountingTransactionLine1); c2g.TransactionService.AccountingTransactionLine accountingTransactionLine2 = new c2g.TransactionService.AccountingTransactionLine(); accountingTransactionLine2.setDocumentCurrencyId('a1W360000015OvB'); accountingTransactionLine2.setDocumentValue(-100.00); accountingTransactionLine2.setDueDate(System.today()); accountingTransactionLine2.setGeneralLedgerAccountId('a2B36000000BCZh'); accountingTransactionLine2.setLineDescription('Line2 Description'); accountingTransactionLine2.setLineReference('Line2 Reference'); accountingTransactionLine2.setLineType(c2g.TransactionService.TransactionLineType.ANALYSIS); accountingTransactionLine2.setFieldValue('MyCustomTextField__c', 'DEF'); accountingTransaction.TransactionLineItems.add(accountingTransactionLine2); c2g.TransactionService.PostOptions postOptions = new c2g.TransactionService.PostOptions(); postOptions.DestinationCompanyId = 'a1r36000000ufsL'; List<Id> postTransactionIdList = c2g.TransactionService.post(new List<c2g.TransactionService.AccountingTransaction>{accountingTransaction}, postOptions); c2g.TransactionService.ReverseTransactionInfoglobal with sharing class ReverseTransactionInfo Holds the original transaction ID and required information to reverse an allocation transaction. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. c2g.TransactionService.ReverseTransactionInfo reverseTransactionInfo = new c2g.TransactionService.ReverseTransactionInfo(); reverseTransactionInfo.OriginalTransactionId = 'a2124000000TjIP'; reverseTransactionInfo.ReversePeriodId = 'a1f24000000PdIK'; reverseTransactionInfo.ReverseReason = 'Reverse Reason'; reverseTransactionInfo.ReverseTransactionDate = System.today(); Properties
Methods
ReverseTransactionInfoglobal ReverseTransactionInfo() Return ValueThis constructor does not return a value. ReverseTransactionInfoglobal ReverseTransactionInfo(Id originalTransactionId, String reverseReason, Date reverseTransactionDate, Id reversePeriodId) Input Parameters
Return ValueThis constructor does not return a value. c2g.TransactionService.AccountingTransactionglobal with sharing class AccountingTransaction Holds the transaction and transaction line items to post. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. c2g.TransactionService.AccountingTransaction accountingTransaction = new c2g.TransactionService.AccountingTransaction(); accountingTransaction.setTransactionDate(System.today()); accountingTransaction.setPeriodId('a2k36000001lLk4'); accountingTransaction.setTransactionType(c2g.TransactionService.TransactionType.JOURNAL); c2g.TransactionService.AccountingTransactionLine accountingTransactionLine1 = new c2g.TransactionService.AccountingTransactionLine(); accountingTransactionLine1.setDocumentCurrencyId('a1W360000015OvB'); accountingTransactionLine1.setDocumentValue(100.00); accountingTransactionLine1.setDueDate(System.today()); accountingTransactionLine1.setGeneralLedgerAccountId('a2B36000000BCZh'); accountingTransactionLine1.setLineDescription('Line1 Description'); accountingTransactionLine1.setLineReference('Line1 Reference'); accountingTransactionLine1.setLineType(c2g.TransactionService.TransactionLineType.ANALYSIS); accountingTransactionLine1.setFieldValue('MyCustomTextField__c', 'ABC'); accountingTransaction.TransactionLineItems.add(accountingTransactionLine1); c2g.TransactionService.AccountingTransactionLine accountingTransactionLine2 = new c2g.TransactionService.AccountingTransactionLine(); accountingTransactionLine2.setDocumentCurrencyId('a1W360000015OvB'); accountingTransactionLine2.setDocumentValue(-100.00); accountingTransactionLine2.setDueDate(System.today()); accountingTransactionLine2.setGeneralLedgerAccountId('a2B36000000BCZh'); accountingTransactionLine2.setLineDescription('Line2 Description'); accountingTransactionLine2.setLineReference('Line2 Reference'); accountingTransactionLine2.setLineType(c2g.TransactionService.TransactionLineType.ANALYSIS); accountingTransactionLine2.setFieldValue('MyCustomTextField__c', 'DEF'); accountingTransaction.TransactionLineItems.add(accountingTransactionLine2); Properties
Methods
AccountingTransactionglobal AccountingTransaction() Return ValueThis constructor does not return a value. setFieldValueglobal void setFieldValue(String fieldName, Object value) Sets the value of your own custom field in the transaction. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
setFieldValueglobal void setFieldValue(Schema.SObjectField sObjField, Object value) Sets the value of your own custom field in the transaction. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
getFieldValueglobal Object getFieldValue(String fieldName) Returns the value of your own custom field in the transaction. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
Return ValueField value. getFieldValueglobal Object getFieldValue(Schema.SObjectField sObjField) Returns the value of your own custom field in the transaction. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
Return ValueField value. setDocumentDescriptionglobal void setDocumentDescription(String value) Sets the document description of the transaction. Input Parameters
getDocumentDescriptionglobal String getDocumentDescription() Returns the document description of the transaction. Return ValueDocument Description. setDocumentNumberglobal void setDocumentNumber(String value) Sets the document number of the transaction. Input Parameters
getDocumentNumberglobal String getDocumentNumber() Returns the document number of the transaction. Return ValueDocument Number. setDocumentReferenceglobal void setDocumentReference(String value) Sets the document reference of the transaction. Input Parameters
getDocumentReferenceglobal String getDocumentReference() Returns the document reference of the transaction. Return ValueDocument Reference. setDocumentReference2global void setDocumentReference2(String value) Sets the document reference 2 of the transaction. Input Parameters
getDocumentReference2global String getDocumentReference2() Returns the document reference 2 of the transaction. Return ValueDocument Reference 2. setPeriodIdglobal void setPeriodId(Id value) Sets the period Id of the transaction. Input Parameters
getPeriodIdglobal Id getPeriodId() Returns the period Id of the transaction. Return ValuePeriod Id. setTransactionDateglobal void setTransactionDate(Date value) Sets the transaction date of the transaction. Input Parameters
getTransactionDateglobal Date getTransactionDate() Returns the transaction date of the transaction. Return ValueTransaction Date. setTransactionTypeglobal void setTransactionType(c2g.TransactionService.TransactionType value) Sets the transaction type of the transaction. Input Parameters
getTransactionTypeglobal c2g.TransactionService.TransactionType getTransactionType() Returns the transaction type of the transaction. Return ValueTransaction Type. setVendorDocumentNumberglobal void setVendorDocumentNumber(String value) Sets the vendor document number of the transaction. Input Parameters
getVendorDocumentNumberglobal String getVendorDocumentNumber() Returns the vendor document number of the transaction. Return ValueVendor Document Number. c2g.TransactionService.AccountingTransactionLineglobal with sharing class AccountingTransactionLine Holds a transaction line item. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. c2g.TransactionService.AccountingTransaction accountingTransaction = new c2g.TransactionService.AccountingTransaction(); accountingTransaction.setTransactionDate(System.today()); accountingTransaction.setPeriodId('a2k36000001lLk4'); accountingTransaction.setTransactionType(c2g.TransactionService.TransactionType.JOURNAL); c2g.TransactionService.AccountingTransactionLine accountingTransactionLine1 = new c2g.TransactionService.AccountingTransactionLine(); accountingTransactionLine1.setDocumentCurrencyId('a1W360000015OvB'); accountingTransactionLine1.setDocumentValue(100.00); accountingTransactionLine1.setDueDate(System.today()); accountingTransactionLine1.setGeneralLedgerAccountId('a2B36000000BCZh'); accountingTransactionLine1.setLineDescription('Line1 Description'); accountingTransactionLine1.setLineReference('Line1 Reference'); accountingTransactionLine1.setLineType(c2g.TransactionService.TransactionLineType.ANALYSIS); accountingTransactionLine1.setFieldValue('MyCustomTextField__c', 'ABC'); accountingTransaction.TransactionLineItems.add(accountingTransactionLine1); c2g.TransactionService.AccountingTransactionLine accountingTransactionLine2 = new c2g.TransactionService.AccountingTransactionLine(); accountingTransactionLine2.setDocumentCurrencyId('a1W360000015OvB'); accountingTransactionLine2.setDocumentValue(-100.00); accountingTransactionLine2.setDueDate(System.today()); accountingTransactionLine2.setGeneralLedgerAccountId('a2B36000000BCZh'); accountingTransactionLine2.setLineDescription('Line2 Description'); accountingTransactionLine2.setLineReference('Line2 Reference'); accountingTransactionLine2.setLineType(c2g.TransactionService.TransactionLineType.ANALYSIS); accountingTransactionLine2.setFieldValue('MyCustomTextField__c', 'DEF'); accountingTransaction.TransactionLineItems.add(accountingTransactionLine2); Methods
AccountingTransactionLineglobal AccountingTransactionLine() Return ValueThis constructor does not return a value. setFieldValueglobal void setFieldValue(String fieldName, Object value) Sets the value of your own custom field in the transaction line item. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
setFieldValueglobal void setFieldValue(Schema.SObjectField sObjField, Object value) Sets the value of your own custom field in the transaction line item. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
getFieldValueglobal Object getFieldValue(String fieldName) Returns the value of your own custom field in the transaction line item. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
Return ValueField value. getFieldValueglobal Object getFieldValue(Schema.SObjectField sObjField) Returns the value of your own custom field in the transaction line item. If the field received as a parameter does not exist, or belongs to Accounting, then an exception is thrown. Input Parameters
Return ValueField value. setAccountIdglobal void setAccountId(Id value) Sets the account Id of the transaction line item. Input Parameters
getAccountIdglobal Id getAccountId() Returns the account Id of the transaction line item. Return ValueAccount Id. setAccountValueglobal void setAccountValue(Decimal value) Sets the account value of the transaction line item. Input Parameters
getAccountValueglobal Decimal getAccountValue() Returns the account value of the transaction line item. Return ValueAccount Value. setBankAccountIdglobal void setBankAccountId(Id value) Sets the bank account Id of the transaction line item. Input Parameters
getBankAccountIdglobal Id getBankAccountId() Returns the bank account Id of the transaction line item. Return ValueBank Account Id. setBankAccountValueglobal void setBankAccountValue(Decimal value) Sets the bank account value of the transaction line item. Input Parameters
getBankAccountValueglobal Decimal getBankAccountValue() Returns the bank account value of the transaction line item. Return ValueBank Account Value. setDimension1Idglobal void setDimension1Id(Id value) Sets the dimension1 Id of the transaction line item. Input Parameters
getDimension1Idglobal Id getDimension1Id() Returns the dimension1 Id of the transaction line item. Return ValueDimension1 Id. setDimension1Valueglobal void setDimension1Value(Decimal value) Sets the dimension1 value of the transaction line item. Input Parameters
getDimension1Valueglobal Decimal getDimension1Value() Returns the dimension1 value of the transaction line item. Return ValueDimension1 Value. setDocumentRateglobal void setDocumentRate(Decimal value) Sets the exchange rate to use on this transaction line item for document to home currency. Input Parameters
getDocumentRateglobal Decimal getDocumentRate() Returns the exchange rate used on this transaction line item for document to home currency. Return ValueThe exchange rate on this transaction line item for document to home currency. setDimension2Idglobal void setDimension2Id(Id value) Sets the dimension2 Id of the transaction line item. Input Parameters
getDimension2Idglobal Id getDimension2Id() Returns the dimension2 Id of the transaction line item. Return ValueDimension2 Id. setDimension2Valueglobal void setDimension2Value(Decimal value) Sets the dimension2 value of the transaction line item. Input Parameters
getDimension2Valueglobal Decimal getDimension2Value() Returns the dimension2 value of the transaction line item. Return ValueDimension2 Value. setDimension3Idglobal void setDimension3Id(Id value) Sets the dimension3 Id of the transaction line item. Input Parameters
getDimension3Idglobal Id getDimension3Id() Returns the dimension3 Id of the transaction line item. Return ValueDimension3 Id. setDimension3Valueglobal void setDimension3Value(Decimal value) Sets the dimension3 value of the transaction line item. Input Parameters
getDimension3Valueglobal Decimal getDimension3Value() Returns the dimension3 value of the transaction line item. Return ValueDimension3 Value. setDimension4Idglobal void setDimension4Id(Id value) Sets the dimension4 Id of the transaction line item. Input Parameters
getDimension4Idglobal Id getDimension4Id() Returns the dimension4 Id of the transaction line item. Return ValueDimension4 Id. setDimension4Valueglobal void setDimension4Value(Decimal value) Sets the dimension4 value of the transaction line item. Input Parameters
getDimension4Valueglobal Decimal getDimension4Value() Returns the dimension4 value of the transaction line item. Return ValueDimension4 Value. setDocumentCurrencyIdglobal void setDocumentCurrencyId(Id value) Sets the document currency Id of the transaction line item. Input Parameters
getDocumentCurrencyIdglobal Id getDocumentCurrencyId() Returns the document currency Id of the transaction line item. Return ValueDocument Currency Id. setDocumentValueglobal void setDocumentValue(Decimal value) Sets the document value of the transaction line item. Input Parameters
getDocumentValueglobal Decimal getDocumentValue() Returns the document value of the transaction line item. Return ValueDocument Value. setDualRateglobal void setDualRate(Decimal value) Sets the exchange rate on this transaction line item for home to dual currency. Input Parameters
getDualRateglobal Decimal getDualRate() Returns the exchange rate used on this transaction line item for home to dual currency. Return ValueThe exchange rate on this transaction line item for home to dual currency. setDualValueglobal void setDualValue(Decimal value) Sets the dual value of the transaction line item. Input Parameters
getDualValueglobal Decimal getDualValue() Returns the dual value of the transaction line item. Return ValueDual Value. setReportingRateglobal void setReportingRate(Decimal value) Sets the exchange rate on this transaction line item for home to reporting currency. Input Parameters
getReportingRateglobal Decimal getReportingRate() Returns the exchange rate used on this transaction line item for home to reporting currency. Return ValueThe exchange rate on this transaction line item for home to reporting currency. setDueDateglobal void setDueDate(Date value) Sets the due date of the transaction line item. Input Parameters
getDueDateglobal Date getDueDate() Returns the due date of the transaction line item. Return ValueDue Date. getExcludefromCashFlowglobal Boolean getExcludefromCashFlow() Returns the Exclude from CashFlow value of the transaction line item. Return ValueExclude from Cash Flow value. setExcludefromCashFlowglobal void setExcludefromCashFlow(Boolean value) Sets the Exclude from CashFlow of the transaction line item. Input Parameters
getIsWithholdingTaxglobal Boolean getIsWithholdingTax() Returns the Is Withholding Tax value of the transaction line item. Return ValueValue Is Withholding Tax. setIsWithholdingTaxglobal void setIsWithholdingTax(Boolean value) Sets the Is Withholding Tax value of the transaction line item. Input Parameters
setGeneralLedgerAccountIdglobal void setGeneralLedgerAccountId(Id value) Sets the general ledger account Id of the transaction line item. Input Parameters
getGeneralLedgerAccountIdglobal Id getGeneralLedgerAccountId() Returns the general ledger account Id of the transaction line item. Return ValueGeneral Ledger Account Id. setGeneralLedgerAccountValueglobal void setGeneralLedgerAccountValue(Decimal value) Sets the general ledger account value of the transaction line item. Input Parameters
getGeneralLedgerAccountValueglobal Decimal getGeneralLedgerAccountValue() Returns the general ledger account value of the transaction line item. Return ValueGeneral Ledger Account Value. setHomeValueglobal void setHomeValue(Decimal value) Sets the home value of the transaction line item. Input Parameters
getHomeValueglobal Decimal getHomeValue() Returns the home value of the transaction line item. Return ValueHome Value. setLineDescriptionglobal void setLineDescription(String value) Sets the line description of the transaction line item. Input Parameters
getLineDescriptionglobal String getLineDescription() Returns the line description of the transaction line item. Return ValueLine Description. setLineReferenceglobal void setLineReference(String value) Sets the line reference of the transaction line item. Input Parameters
getLineReferenceglobal String getLineReference() Returns the line reference of the transaction line item. Return ValueLine Reference. setLineTypeglobal void setLineType(c2g.TransactionService.TransactionLineType value) Sets the line type of the transaction line item. Input Parameters
getLineTypeglobal c2g.TransactionService.TransactionLineType getLineType() Returns the line type of the transaction line item. Return ValueLine Type. setProductIdglobal void setProductId(Id value) Sets the product Id of the transaction line item. Input Parameters
getProductIdglobal Id getProductId() Returns the product Id of the transaction line item. Return ValueProduct Id. setTaxCode1Idglobal void setTaxCode1Id(Id value) Sets the tax code1 Id of the transaction line item. Input Parameters
getTaxCode1Idglobal Id getTaxCode1Id() Returns the tax code1 Id of the transaction line item. Return ValueTax Code1 Id. setTaxCode2Idglobal void setTaxCode2Id(Id value) Sets the tax code2 Id of the transaction line item. Input Parameters
getTaxCode2Idglobal Id getTaxCode2Id() Returns the tax code2 Id of the transaction line item. Return ValueTax Code2 Id. setTaxCode3Idglobal void setTaxCode3Id(Id value) Sets the tax code3 Id of the transaction line item. Input Parameters
getTaxCode3Idglobal Id getTaxCode3Id() Returns the tax code3 Id of the transaction line item. Return ValueTax Code3 Id. setDocumentTaxValue1global void setDocumentTaxValue1(Decimal value) Sets the document tax value 1 of the transaction line item. Input Parameters
getDocumentTaxValue1global Decimal getDocumentTaxValue1() Returns the document tax value 1 of the transaction line item. Return ValueDocument Tax Value 1. setDocumentTaxValue2global void setDocumentTaxValue2(Decimal value) Sets the document tax value 2 of the transaction line item. Input Parameters
getDocumentTaxValue2global Decimal getDocumentTaxValue2() Returns the document tax value 2 of the transaction line item. Return ValueDocument Tax Value 2. setDocumentTaxValue3global void setDocumentTaxValue3(Decimal value) Sets the document tax value 3 of the transaction line item. Input Parameters
getDocumentTaxValue3global Decimal getDocumentTaxValue3() Returns the document tax value 3 of the transaction line item. Return ValueDocument Tax Value 3. getDocumentNumberglobal String getDocumentNumber() Returns the Document Number of the transaction line item. Return ValueDocument Number. getTransactionDateglobal Date getTransactionDate() Returns the Transaction Date of the transaction line item. Return ValueTransaction Date. c2g.TransactionService.PostOptionsglobal with sharing class PostOptions Contains data for configuring the post. Properties
Methods |