ExpenseAllocation - createAllocation(GlideRecord target, Number amount)

Creates an expense allocation (fm_expense_allocation) record referencing the parameters provided during instantiation and this method.

Table 1. Parameters
Name Type Description
target GlideRecord GlideRecord target of the allocation, for example a cost center record to allocate an expense to Decimal amount - the amount of the allocation.
amount Number The amount of the allocation.
Table 2. Returns
Type Description
Boolean True if the expense allocation was successfully created.

var allocation=new ExpenseAllocation(expenseGlideRecord, ruleGlideRecord);
allocation.createAllocation(costCenterGlideRecord, 2345.67);