FSM Expense Report Model Reference
This reference is intended for administrators and developers who work with Expense Report model mappings and inherited transaction behavior.
The Expense Report model represents expensereport and inherits the Transaction model's common body mapping and transaction behavior. Its explicit prototype.defaults is empty.
Standard default structure (JSON fragment):
{
"models/expensereport": {
"prototype": {
"record": "expensereport",
"map": {
"id": "*formulatext:case when {line} > 0 then {internalid} end|internalid",
"type": "formulatext:nvl({recordtype}, lower({type}))",
"createdfrom": "createdfrom",
"createdfromtype": "createdfrom.recordtype|",
"entity": "entity",
"customer": "custbody_nx_customer",
"asset": "custbody_nx_asset",
"case": "custbody_nx_case",
"task": "custbody_nx_task",
"status": "status",
"date": "trandate",
"email": "email",
"contact": "contactprimary.internalid|",
"purchaseorder": "otherrefnum|",
"paymentmethod": "paymentmethod",
"expenses": [
{
"entity": "customer.internalid|expense.customer",
"memo": "formulatext:REPLACE({memo}, {expensecategory}||': ')|expense.memo",
"amount": "amount|expense.amount",
"category": "expensecategory|expense.category",
"billable": "billable|expense.isbillable",
"taskcol": "custcol_nx_task|expense.custcol_nx_task",
"asset": "custcol_nx_asset|expense.custcol_nx_asset",
"foreignamount": "custcol_nx_foreignamount|expense.foreignamount"
}
]
},
"defaults": {},
"syncentity": false,
"inventory": false
}
}
}
For the meaning of the inherited syncentity and inventory properties and guidance on changing these properties, see Transaction Mappings and Processing Properties.
The inherited Project and Project Task mappings vary with Project Management. For the inherited mapping values, see FSM Transaction Base Model Reference.
The prototype.map.expenses array maps expense lines as follows:
-
Customer - Mapped through
customer.internalid|expense.customer -
Memo - Mapped to
expense.memo -
Amount - Mapped to
expense.amount -
Category - Mapped to
expense.category -
Billable - Mapped to
expense.isbillable -
Task - Mapped to
expense.custcol_nx_task -
Asset - Mapped to
expense.custcol_nx_asset -
Foreign amount - Mapped to
expense.foreignamount
Preserve the complete line array when extending it. An incomplete editable line collection can remove existing lines when saved. The model's after-submit behavior updates Case unbilled amounts when a Case link is present. Expense billing rules and FSM Mobile Expense form defaults are separate from this model mapping. For sublist syntax, see FSM Searches and Field Mapping. For billing rules, see Configuring FSM Billing Rules.