FSM Sales Order Model Reference
This reference is intended for administrators and developers who work with Sales Order model mappings, defaults, and processing behavior.
This Sales Order model represents salesorder and inherits Transaction behavior. It enables entity synchronization and adds an Item line map containing Item, quantity, entity, rate, and Task. The standard purchase-order mapping is otherrefnum.
Standard default structure (JSON fragment):
{
"models/salesorder": {
"prototype": {
"record": "salesorder",
"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",
"items": [
{
"item": "item|item.item",
"quantity": "quantity|item.quantity",
"entity": "entity|item.entity",
"rate": "rate|item.price",
"task": "custcol_nx_task|item.custcol_nx_task"
}
]
},
"defaults": {
"orderstatus": "B",
"iscrosssubtransaction": true
},
"syncentity": true,
"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.
Its creation defaults are orderstatus: "B" and iscrosssubtransaction: true. These are the processing model's defaults, not a universal promise about the initial state of every Sales Order created through FSM Mobile. The model can add Consumable lines with inventory and pricing data, update the linked case, and unlink Consumables when the Sales Order is destroyed.
Use prototype.defaults.customform to supply the form for sales orders created through this model. For information about this setting, see Custom Forms for Record Creation. The FSM Mobile salesorder article has separate fulfillment and synchronization behavior. Changing this model or copying the FSM Mobile resource's visible JSON doesn't establish that a new resource will retain that behavior.