routes/mobile

Mobile web app server

Members

actions

Type

Description

Actions

Default

            {
  "actions": {
    "label": "Task",
    "icon": "checked",
    "element": {
      "number": {
        "type": "text",
        "label": "Number",
        "class": "col-2",
        "title": true,
        "hidden": true,
        "column": 1
      },
      "type": {
        "type": "select",
        "label": "Type",
        "class": "el-12",
        "required": true,
        "column": 1,
        "options": {
          "sort": "label",
          "task": {
            "record": "customrecord_nx_task_type",
            "map": {
              "id": "internalid",
              "label": "name"
            }
          }
        }
      },
      "message": {
        "type": "textarea",
        "placeholder": "Message...",
        "class": "el-12"
      },
      "assigned": {
        "type": "select",
        "label": "Assigned",
        "placeholder": "Lead...",
        "class": "el-12",
        "value": {
          "id": "${ user.internalid }",
          "label": "${ user.label }"
        },
        "required": true,
        "options": "resources.options"
      },
      "team": {
        "type": "select",
        "multiple": true,
        "placeholder": "Team...",
        "class": "el-12",
        "value": "${ event.team }",
        "options": "resources.options"
      },
      "resources": {
        "type": "datalist",
        "options": {
          "sort": "label",
          "employee": {
            "record": "employee",
            "filters": [
              [
                "isinactive",
                "is",
                "F"
              ],
              "and",
              [
                "custentity_nx_region",
                "noneof",
                "@NONE@"
              ]
            ],
            "map": {
              "id": "internalid",
              "label": "formulatext:nvl(trim(trim(trim({firstname})||' '||{middlename})||' '||{lastname}), {entityid})"
            }
          }
        }
      },
      "date": {
        "type": "date",
        "label": "Date",
        "class": "el-4",
        "value": "${ event.date }",
        "column": 2,
        "required": true
      },
      "start": {
        "type": "timeofday",
        "label": "Start",
        "class": "el-4",
        "value": "09:00",
        "step": 60
      },
      "end": {
        "type": "timeofday",
        "label": "End",
        "class": "el-4",
        "value": "17:00",
        "step": 60
      },
      "booking": {
        "type": "checkbox",
        "label": "Confirmed Booking"
      }
    },
    "article": {
      "record": "task",
      "filters": [
        "custevent_nx_created_from",
        "anyof",
        "${ event.internalid }"
      ],
      "map": {
        "number": "custevent_nx_task_number",
        "start": "formulatext:to_char(nvl({custevent_nx_start_time},{starttime}),'fmHH:fmMI am')|custevent_nx_start_time",
        "end": "formulatext:to_char(nvl({custevent_nx_end_time}, cast({enddate} as timestamp with local time zone)),'fmHH:fmMI am')|custevent_nx_end_time",
        "date": "formuladate:nvl({custevent_nx_start_date},{startdate})|custevent_nx_start_date",
        "booking": "custevent_nx_task_booking_confirmed",
        "message": "message",
        "assigned": {
          "id": "=assigned",
          "label": "#assigned|"
        },
        "team": {
          "id": "=custevent_nx_task_team[]",
          "label": "#custevent_nx_task_team[]"
        },
        "type": {
          "id": "=custevent_nx_task_type",
          "label": "#custevent_nx_task_type|"
        }
      },
      "idempotencyField": "custevent_nx_idempotency_key",
      "defaults": {
        "custevent_nx_customer": "${ event.customer }",
        "company": "${ event.company }",
        "supportcase": "${ event.supportcase }",
        "custevent_nx_task_asset": "${ event.asset }",
        "custevent_nx_created_from": "${ event.internalid }",
        "timedevent": true
      }
    }
  }
} 

          

addable

Type

Description

Boolean

Show the new event button

Default

            {
  "addable": false
} 

          

administrators

Type

Description

Array.<Number>

NetSuite Users in any of these roles are considered Mobile Administrators allowing them to generate mobile invites for other users and to login as another Mobile User. Roles with NextService Mobile check will show here by default.

Default

            {
  "administrators": [
    3
  ]
} 

          

asset

Type

Description

Object

Resource that presents information about the Asset or one of its child assets.

Default

            {
  "asset": {
    "label": "Asset",
    "hidden": "${ !options.asset && !event.asset }",
    "min": 1,
    "max": 1,
    "element": {
      "image": {
        "type": "image",
        "readonly": true
      },
      "description": {
        "type": "textarea",
        "label": "Description",
        "readonly": true
      }
    },
    "article": {
      "record": "customrecord_nx_asset",
      "filters": [
        [
          "internalid",
          "anyof",
          "${ event.asset || 0 }"
        ],
        "or",
        [
          [
            "parent",
            "noneof",
            "@NONE@"
          ],
          "and",
          [
            "parent.internalid",
            "anyof",
            "${ event.asset || 0 }"
          ]
        ]
      ],
      "filterby": {
        "id": "${ options.asset || event.asset }"
      },
      "map": {
        "image": {
          "id": "=formulatext:nvl({custrecord_nx_asset_item.storedisplaythumbnail.id}, {custrecord_nx_asset_item.storedisplayimage.id})",
          "url": "formulatext:'${ url }file/'||nvl({custrecord_nx_asset_item.storedisplaythumbnail.id}, {custrecord_nx_asset_item.storedisplayimage.id})||'&key=${ user.key }'"
        },
        "description": "custrecord_nx_asset_item.description|"
      }
    }
  }
} 

          

consumables

Type

Description

Object

Resource that allows the user to consume inventory from their warehouse.

Default

            {
  "consumables": {
    "label": "Inventory",
    "icon": "wrench",
    "element": {
      "inventory": {
        "label": "Inventory",
        "type": "select",
        "class": "el-9",
        "search": true,
        "barcode": true,
        "options": "consumable.options"
      },
      "quantity": {
        "label": "Quantity",
        "type": "integer",
        "class": "el-3",
        "column": 4,
        "min": 1,
        "step": 1,
        "required": true
      },
      "item": {
        "label": "Item",
        "type": "select",
        "class": "el-12",
        "column": 1,
        "readonly": true,
        "required": true,
        "value": "inventory.options.filter(o=> { return o.id == inventory.value.id })[0].item"
      },
      "location": {
        "label": "Location",
        "type": "select",
        "class": "el-12",
        "readonly": true,
        "value": "inventory.options.filter(o=> { return o.id == inventory.value.id })[0].location"
      },
      "bin": {
        "label": "Bin",
        "type": "select",
        "class": "el-12",
        "column": 2,
        "readonly": true,
        "value": "inventory.options.filter(o=> { return o.id == inventory.value.id })[0].bin"
      },
      "seriallot": {
        "label": "Serial/Lot",
        "type": "text",
        "class": "el-12",
        "column": 3,
        "readonly": true,
        "value": "inventory.options.filter(o=> { return (o.id == inventory.value.id) && (o.serial || o.lot) }).map(o=> { return o.serial || o.lot })[0].label"
      },
      "number": {
        "label": "Number",
        "type": "text",
        "class": "el-12",
        "hidden": true,
        "value": "inventory.options.filter(o=> { return (o.id == inventory.value.id) && (o.serial || o.lot) }).map(o=> { return o.serial || o.lot })[0].id"
      }
    },
    "article": {
      "record": "customrecord_nx_consumable",
      "filters": [
        [
          "custrecord_nx_constask",
          "anyof",
          "${ event.internalid }"
        ],
        "and",
        [
          "custrecord_nx_consemployee",
          "anyof",
          "${ user.internalid }"
        ]
      ],
      "filterby": {
        "asset": "${ options.asset || event.asset }"
      },
      "map": {
        "readonly": "formulatext:case when {custrecord_nx_constask.status.id} like 'COMPLETE' then 'T' else 'F' end",
        "quantity": "custrecord_nx_consqty",
        "asset": "custrecord_nx_consasset",
        "inventory": {
          "id": "=formulatext:'item-'||{custrecord_nx_consitem.id}||'-'||{custrecord_nx_conslocation.id}||'-'||{custrecord_nx_conbin}||'-'||{custrecord_nx_conserial}",
          "label": "formulatext:{custrecord_nx_consitem}||nvl2({custrecord_nx_conbin},' : BIN '||{custrecord_nx_conbin},'')||nvl2({custrecord_nx_conseriallabel},' : I/N '||{custrecord_nx_conseriallabel},'')"
        },
        "item": {
          "id": "=custrecord_nx_consitem",
          "label": "#custrecord_nx_consitem|"
        },
        "location": {
          "id": "=custrecord_nx_conslocation",
          "label": "formulatext:regexp_replace({custrecord_nx_conslocation}, '.* : ')|"
        },
        "bin": {
          "id": "=#custrecord_nx_conbin",
          "label": "#custrecord_nx_conbin|"
        },
        "number": "custrecord_nx_conserial",
        "seriallot": "custrecord_nx_conseriallabel"
      },
      "idempotencyField": "custrecord_nx_consumable_idempotency_key",
      "defaults": {
        "custrecord_nx_constask": "${ event.internalid }",
        "asset": "${ options.asset || event.asset }",
        "custrecord_nx_consemployee": "${ user.internalid }"
      }
    }
  }
} 

          

contact

Type

Description

Contact

Default

            {
  "contact": {
    "label": "Contacts",
    "icon": "torso",
    "readonly": true,
    "element": {
      "name": {
        "type": "text",
        "label": "Name",
        "title": true,
        "column": 1,
        "hidden": true
      },
      "image": {
        "type": "image",
        "readonly": true
      },
      "email": {
        "type": "email",
        "label": "Email",
        "column": 2,
        "class": "el-12"
      },
      "phone": {
        "type": "phone",
        "label": "Phone",
        "column": 3,
        "class": "el-12"
      },
      "mobile": {
        "type": "phone",
        "label": "Mobile",
        "class": "el-12"
      }
    },
    "article": {
      "contact": {
        "record": "contact",
        "filters": [
          "internalid",
          "anyof",
          "${ event.contact }"
        ],
        "map": {
          "name": "entityid",
          "email": "email",
          "phone": "phone",
          "mobile": "mobilephone",
          "image": {
            "id": "=image",
            "url": "formulatext:'${ url }file/'||{‌image.id}||'&key=${ user.key }'"
          }
        }
      },
      "customer": {
        "record": "customer",
        "filters": [
          "formulatext:case when {internalid} = '${ event.customer }' and '${ event.contact }' = '0' then 'T' else 'F' end",
          "is",
          "T"
        ],
        "map": {
          "name": "formulatext:nvl(trim({firstname}||' '||{lastname}),{companyname})",
          "email": "email",
          "phone": "phone",
          "mobile": "mobilephone"
        }
      }
    }
  }
} 

          

details

Type

Description

Object

Details resource

Default

            {
  "details": {
    "label": "Details",
    "icon": "clipboard",
    "min": 1,
    "max": 1,
    "element": {
      "actions": {
        "type": "longtext",
        "label": "Actions Taken",
        "placeholder": "Actions taken...",
        "class": "el-12",
        "readonly": "${ event.teamuser }",
        "summary": true
      },
      "caseclosed": {
        "type": "checkbox",
        "label": "Case Closed",
        "class": "el-12",
        "readonly": "${ event.teamuser }",
        "hidden": "${ event.projecttask }",
        "summary": true
      }
    },
    "article": {
      "record": "${ event.record }",
      "filters": "${ event.internalid }",
      "map": {
        "actions": "custevent_nx_actions_taken",
        "caseclosed": "custevent_nx_case_closed"
      }
    }
  }
} 

          

event

Type

Description

Object

Events to load for the current User. This can be configured to source different record types but by default only CRM Tasks are shown.

Properties

Property

Type

Description

event.record

String

Record type

event.filters

Filterexpression

Search filters to apply to the record type

event.map

Object

Field map of search columns and fields. These attributes will be available in definitions for Resources and Articles.

event.map.id

String

Must include an id attribute who's value will be in the pattern of "{modelid}-{internalid}".

event.map.label

String

Label for the event.

event.map.label

String

Sublabel for the event.

event.map.startdate

String

Start date time stamp for the event.

event.map.enddate

String

End date time stamp for the event.

event.map.address

String

Address of the event in Google Api friendly format.

event.map.latitude

Number

Latitude of the event.

event.map.longitude

Number

Longitude of the event.

event.map.timezone

String

Timezone of the event in NetSuite compatible Olsom values. Requests for the Event, it's Resources, and its Articles will be run in this timezone.

event.resources

Array.<object>

Set of rules to lookup which Resources to load for the user. Properties added to the rules will filter the attribute on the user.

event.resources[].resources

Array.<string>

Resource ids to load for the containing rule.

Default

            {
  "event": {
    "element": {
      "asset": {
        "type": "select",
        "label": "Asset",
        "class": "el-4",
        "required": true,
        "search": true,
        "remote": true,
        "options": {
          "record": "customrecord_nx_asset",
          "filters": [
            [
              "isinactive",
              "is",
              "F"
            ],
            "and",
            [
              "formulatext:{name}||' '||nvl(trim({custrecord_nx_asset_customer.firstname}||' '||{custrecord_nx_asset_customer.lastname}),{custrecord_nx_asset_customer.companyname})",
              "contains",
              "${ options.search || '' }"
            ]
          ],
          "map": {
            "id": "internalid",
            "label": "name",
            "customers": "formulatext:{custrecord_nx_asset_customer.internalid}",
            "optgroup": "formulatext:nvl(trim({custrecord_nx_asset_customer.firstname}||' '||{custrecord_nx_asset_customer.lastname}),{custrecord_nx_asset_customer.companyname})",
            "customer": {
              "id": "custrecord_nx_asset_customer",
              "label": "formulatext:nvl(trim({custrecord_nx_asset_customer.firstname}||' '||{custrecord_nx_asset_customer.lastname}),{custrecord_nx_asset_customer.companyname})"
            },
            "timezone": {
              "id": "=custrecord_nx_asset_time_zone",
              "label": "custrecord_nx_asset_time_zone.custrecord_nx_time_zone_abbreviation"
            }
          }
        }
      },
      "job": {
        "type": "select",
        "label": "Project",
        "class": "el-4",
        "required": true,
        "remote": true,
        "asset": "asset.value && asset.value.id",
        "date": "date.value",
        "options": {
          "sort": "label",
          "active": {
            "record": "job",
            "filters": [
              [
                "custentity_nx_asset",
                "is",
                "${ options.asset || 0 }"
              ],
              "and",
              [
                [
                  "startdate",
                  "isempty",
                  ""
                ],
                "or",
                [
                  "startdate",
                  "onorbefore",
                  "${ options.date }"
                ]
              ],
              "and",
              [
                [
                  "enddate",
                  "isempty",
                  ""
                ],
                "or",
                [
                  "enddate",
                  "onorafter",
                  "${ options.date }"
                ]
              ],
              "and",
              [
                "isinactive",
                "is",
                "F"
              ]
            ],
            "map": {
              "id": "internalid",
              "label": "formulatext:{custentity_nx_project_type}||nvl2({startdate},' from '||{startdate},'')||nvl2({enddate},' to '||{enddate},'')||nvl2({custentity_nx_time_zone}, ' ' || {custentity_nx_time_zone.custrecord_nx_time_zone_abbreviation},'')",
              "optgroup": "formulatext:nvl(trim({custentity_nx_customer.firstname}||' '||{custentity_nx_customer.lastname}),{custentity_nx_customer.companyname})",
              "customer": {
                "id": "custentity_nx_customer",
                "label": "formulatext:nvl(trim({custentity_nx_customer.firstname}||' '||{custentity_nx_customer.lastname}),{custentity_nx_customer.companyname})"
              },
              "timezone": {
                "id": "=custentity_nx_time_zone",
                "label": "custentity_nx_time_zone.custrecord_nx_time_zone_abbreviation"
              }
            }
          },
          "types": {
            "record": "customrecord_nx_project_type",
            "filters": [
              [
                "isinactive",
                "is",
                "F"
              ],
              "and",
              [
                "internalid",
                "noneof",
                [
                  0
                ]
              ]
            ],
            "map": {
              "id": "formulatext:'type-'||{internalid}",
              "label": "name",
              "optgroup": "formulatext:'- New -'"
            }
          }
        }
      },
      "date": {
        "type": "date",
        "label": "Date",
        "class": "el-4",
        "column": 2,
        "required": true
      },
      "customer": {
        "type": "select",
        "label": "Customer",
        "class": "el-6",
        "required": true,
        "remote": true,
        "search": "(asset.value && asset.options.filter(o=>{ return o.id == asset.value.id })[0].customers === true) ? 'remote' : 'local'",
        "asset": "asset.value && asset.value.id",
        "value": "(job.value && job.options.filter(o=>{ return o.id == job.value.id })[0].customer) || (asset.value && asset.options.filter(o=>{ return o.id == asset.value.id })[0].customer)",
        "disabled": "job.value && !job.value.id.match(/^type-/)",
        "options": {
          "record": "customer",
          "filters": [
            [
              "formulatext:nvl(trim({firstname}||' '||{lastname}),{companyname})",
              "contains",
              "${ options.search || '' }"
            ],
            "and",
            "${ var customers = typeof asset != 'undefined' && asset && new Asset(asset).customers; return customers && ((customers instanceof Array) ? ['internalid', 'anyof', customers] : ['internalid', 'noneof', '@NONE@']) }"
          ],
          "map": {
            "id": "internalid",
            "label": "formulatext:nvl(nvl(trim({firstname}||' '||{lastname}),{companyname}), {entityid})"
          }
        }
      },
      "contact": {
        "type": "select",
        "label": "Contact",
        "class": "el-6",
        "remote": true,
        "required": "!!(contact.options && contact.options.length)",
        "disabled": "!(contact.options && contact.options.length)",
        "entity": "(job.value && !job.value.id.match(/^type-/) && job.value.id) || (customer.value && customer.value.id)",
        "options": {
          "record": "contact",
          "filters": [
            [
              "customer.internalid",
              "anyof",
              "${ options.entity || 0 }"
            ],
            "or",
            [
              "job.internalid",
              "anyof",
              "${ options.entity || 0 }"
            ]
          ],
          "map": {
            "id": "internalid",
            "label": "<entityid",
            "selected": "formulatext:case when {‌role.id} = -10 then 'T' else '' end"
          }
        }
      },
      "case": {
        "type": "select",
        "label": "Case",
        "class": "el-12",
        "placeholder": "Type...",
        "required": true,
        "column": 1,
        "options": {
          "sort": "label",
          "task": {
            "record": "customrecord_nx_case_type",
            "map": {
              "id": "internalid",
              "label": "name"
            }
          }
        }
      },
      "details": {
        "type": "textarea",
        "placeholder": "Details...",
        "class": "el-12",
        "required": true
      },
      "type": {
        "type": "select",
        "label": "Task",
        "class": "el-12",
        "placeholder": "Type...",
        "required": true,
        "column": 1,
        "options": {
          "sort": "label",
          "task": {
            "record": "customrecord_nx_task_type",
            "map": {
              "id": "internalid",
              "label": "name"
            }
          }
        }
      },
      "message": {
        "type": "textarea",
        "placeholder": "Message...",
        "class": "el-12",
        "required": true
      },
      "start": {
        "type": "timeofday",
        "label": "Start",
        "class": "el-4",
        "value": "09:00",
        "step": 60,
        "required": true
      },
      "end": {
        "type": "timeofday",
        "label": "End",
        "class": "el-4",
        "value": "17:00",
        "step": 60,
        "required": true
      },
      "timezone": {
        "type": "select",
        "label": "Time Zone",
        "class": "el-4",
        "disabled": true,
        "value": "(job.value && job.options.filter(o => o.id == job.value.id)[0].timezone) || (job.value && asset.options.filter(o => o.id == asset.value.id)[0].timezone)"
      },
      "booking": {
        "type": "checkbox",
        "label": "Confirmed Booking"
      }
    },
    "article": {
      "task": {
        "record": "task",
        "filters": [
          [
            [
              "assigned",
              "anyof",
              "${ user.internalid }"
            ],
            "or",
            [
              "custevent_nx_task_team",
              "anyof",
              "${ user.internalid }"
            ]
          ],
          "and",
          [
            "custevent_nx_task_type",
            "noneof",
            "@NONE@"
          ],
          "and",
          [
            "startdate",
            "onorafter",
            "fiveDaysAgo"
          ],
          "and",
          [
            "startdate",
            "onorbefore",
            "fiveDaysFromNow"
          ]
        ],
        "map": {
          "label": "formulatext:coalesce({custevent_nx_customer.companyname},trim({custevent_nx_customer.firstname}||' '||{custevent_nx_customer.lastname}),{custevent_nx_task_type})",
          "sublabel": "custevent_nx_task_asset.name|",
          "startdate": "formulatext:to_char((case when ({custevent_nx_time_zone} is not null and {custevent_nx_start_date} is not null and {custevent_nx_start_time} is not null) then to_timestamp_tz(to_char({custevent_nx_start_date}, 'YYYY-MM-DD') || to_char({custevent_nx_start_time}, 'HH24:MI:SS') || (case when {custevent_nx_time_zone.custrecord_nx_time_zone_olson} like '%/%' then {custevent_nx_time_zone.custrecord_nx_time_zone_olson} else 'Australia/Sydney' end), 'YYYY-MM-DDHH24:MI:SSTZR') else cast({startdate} as timestamp with time zone) end) at time zone 'UTC','YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"')",
          "enddate": "formulatext:to_char((case when ({custevent_nx_time_zone} is not null and {custevent_nx_end_date} is not null and {custevent_nx_end_time} is not null) then to_timestamp_tz(to_char({custevent_nx_end_date}, 'YYYY-MM-DD') || to_char({custevent_nx_end_time}, 'HH24:MI:SS') || (case when {custevent_nx_time_zone.custrecord_nx_time_zone_olson} like '%/%' then {custevent_nx_time_zone.custrecord_nx_time_zone_olson} else 'Australia/Sydney' end), 'YYYY-MM-DDHH24:MI:SSTZR') else cast(({enddate} - trunc(cast({enddate} as date) - cast({startdate} as date))) as timestamp with time zone) end) at time zone 'UTC','YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"')",
          "body": "formulatext:\t\t\t\t\t\t\t\t\t\t'<p>'||trim({case.custevent_nx_case_details}||' '||{message})||'</p>'||\t\t\t\t\t\t\t\t\t\t'<p>'||{custevent_nx_task_type}||' task number '||{custevent_nx_task_number}||\t\t\t\t\t\t\t\t\t\tnvl2({‌job.internalid}, ' in '||{job.custentity_nx_project_type}, '')||\t\t\t\t\t\t\t\t\t\tnvl2({‌case.internalid}, ' '||{case.custevent_nx_case_type}||' case number '||{‌case.casenumber}, '')||'.'||\t\t\t\t\t\t\t\t\t\tnvl2({custevent_nx_task_skill}, ' Skills required are '||replace({custevent_nx_task_skill}, ',', ', ')||'.', '')||'</p>'",
          "address": "custevent_nx_address|",
          "latitude": "custevent_nx_latitude|",
          "longitude": "custevent_nx_longitude|",
          "timezone": {
            "id": "=custevent_nx_time_zone",
            "label": "custevent_nx_time_zone.custrecord_nx_time_zone_abbreviation"
          },
          "timezoneid": "custevent_nx_timezone_depr|",
          "priority": "formulatext:lower({priority})",
          "number": "custevent_nx_task_number",
          "commenced": "formulatext:case when {‌status.id} not like 'NOTSTART' then to_char(cast(nvl({custevent_nx_task_start}, SYSDATE) as timestamp with time zone) at time zone 'UTC','YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') end|custevent_nx_task_start",
          "arrived": "formulatext:to_char(cast({custevent_nx_task_onsite} as timestamp with time zone) at time zone 'UTC','YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"')|custevent_nx_task_onsite",
          "departed": "formulatext:to_char(cast({custevent_nx_task_offsite} as timestamp with time zone) at time zone 'UTC','YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"')|custevent_nx_task_offsite",
          "completed": "formulatext:case when {‌status.id} like 'COMPLETE' then to_char(cast(nvl({custevent_nx_task_end}, SYSDATE) as timestamp with time zone) at time zone 'UTC','YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') end|custevent_nx_task_end",
          "asset": "custevent_nx_task_asset",
          "job": "job.internalid|company",
          "supportcase": "case.internalid|supportcase",
          "type": "custevent_nx_task_type",
          "booking": "custevent_nx_task_booking_confirmed",
          "date": "formuladate:nvl({custevent_nx_start_date},{startdate})|custevent_nx_start_date",
          "start": "formulatext:to_char(nvl({custevent_nx_start_time},{starttime}),'fmHH:fmMI am')|custevent_nx_start_time",
          "end": "formulatext:to_char(nvl({custevent_nx_end_time}, cast({enddate} as timestamp with local time zone)),'fmHH:fmMI am')|custevent_nx_end_time",
          "project": "job.custentity_nx_project_type|",
          "case": "case.custevent_nx_case_type|",
          "task": "custevent_nx_task_type|",
          "assettype": "custevent_nx_task_asset.custrecord_nx_asset_type|",
          "crmtask": "internalid",
          "customer": "custevent_nx_customer",
          "company": "company",
          "subsidiary": "formulatext:coalesce({case.subsidiary.id}, {job.subsidiary.id}, {company.subsidiary.id})",
          "team": {
            "id": "=custevent_nx_task_team[]",
            "label": "#custevent_nx_task_team[]"
          },
          "teamuser": "formulatext:case when instr(','||{custevent_nx_task_team.id}||',', ','||'${ user.internalid }'||',') = 0 then 'F' else 'T' end",
          "assigneduser": "formulatext:case when '${ user.internalid }' = {‌Assigned.id} then 'T' else 'F' end",
          "contact": "formulatext:COALESCE(TO_NUMBER({‌contact.id}), TO_NUMBER({case.contact.id}), TO_NUMBER({job.contact.id}), TO_NUMBER({custevent_nx_customer.contact.id}), 0)",
          "email": "case.email|"
        },
        "idempotencyField": "custevent_nx_idempotency_key",
        "resources": [],
        "defaults": {
          "name": "To Be Generated",
          "starttimetz": "09:00",
          "endtimetz": "17:00"
        }
      },
      "projecttask": false
    }
  }
} 

          

expenses

Type

Description

Expenses

Default

            {
  "expenses": {
    "label": "Expenses",
    "icon": "creditcard",
    "max": 1,
    "element": {
      "expenses": {
        "type": "table",
        "label": "Expenses",
        "required": true
      },
      "entity": {
        "type": "hidden",
        "value": "${ event.company }",
        "parent": "expenses"
      },
      "asset": {
        "type": "hidden",
        "value": "${ event.asset }",
        "parent": "expenses"
      },
      "crmtask": {
        "type": "hidden",
        "value": "${ event.crmtask }",
        "parent": "expenses"
      },
      "category": {
        "type": "select",
        "label": "Category",
        "class": "col-xs-0 col-sm-0 el-9",
        "required": true,
        "parent": "expenses",
        "column": 2,
        "options": {
          "sort": "label",
          "categories": {
            "record": "expensecategory",
            "filters": [
              "custrecord_nx_expensecat_show_on_mobile",
              "is",
              "T"
            ],
            "map": {
              "id": "internalid",
              "label": "name"
            }
          }
        }
      },
      "amount": {
        "type": "currency",
        "label": "Amount",
        "class": "el-3",
        "min": 0.01,
        "step": 0.01,
        "required": true,
        "parent": "expenses",
        "column": 4
      },
      "date": {
        "type": "date",
        "label": "Date",
        "class": "col-xs-0",
        "hidden": "${ event.crmtask }",
        "parent": "expenses",
        "column": 3
      },
      "memo": {
        "type": "textarea",
        "label": "Description",
        "required": true,
        "parent": "expenses",
        "column": 1
      },
      "receipt": {
        "type": "image",
        "label": "Receipt",
        "parent": "expenses"
      },
      "total": {
        "type": "currency",
        "label": "Total",
        "class": "el-12",
        "readonly": true,
        "column": 3
      },
      "status": {
        "type": "text",
        "label": "Status",
        "class": "el-12",
        "readonly": true,
        "column": 2
      },
      "tranid": {
        "type": "text",
        "label": "Transaction",
        "hidden": true,
        "title": true,
        "column": 1
      }
    },
    "article": {
      "extend": "models/transaction",
      "record": "expensereport",
      "filters": [
        [
          [
            "custbody_nx_task",
            "anyof",
            "${ event.internalid }"
          ],
          "or",
          [
            "custbody_nx_projecttask",
            "anyof",
            "${ event.internalid }"
          ]
        ],
        "and",
        [
          "employee.internalid",
          "anyof",
          "${ user.internalid }"
        ]
      ],
      "map": {
        "id": "*formulanumeric:case when {taxline} = 'F' and {line} > 0 then {internalid} end|internalid",
        "tranid": "tranid|",
        "status": "status#|",
        "total": "total|",
        "expenses": [
          {
            "line": "line|expense.line",
            "entity": "customer.internalid|expense.customer",
            "memo": "formulatext:REPLACE({memo}, {expensecategory}||': ')|expense.memo",
            "amount": "amount|expense.amount",
            "category": {
              "id": "=expensecategory|expense.category",
              "label": "#expensecategory|"
            },
            "receipt": {
              "id": "=lineFile.internalid|expense.expmediaitem",
              "url": "formulatext:nvl2({‌lineFile.internalid},'${ url }file/'||{lineFile.internalid.id}||'&key=${ user.key }', '')"
            },
            "date": "expensedate|expense.expensedate",
            "asset": "custcol_nx_asset|expense.custcol_nx_asset",
            "crmtask": "custcol_nx_task|expense.custcol_nx_task"
          }
        ]
      },
      "defaults": {
        "custbody_nx_customer": "${ event.customer }",
        "custbody_nx_task": "${ event.crmtask }",
        "custbody_nx_projecttask": "${ event.projecttask }",
        "custbody_nx_case": "${ event.supportcase }",
        "custbody_nx_asset": "${ event.asset }",
        "entity": "${ user.internalid }",
        "trandate": "${ event.date }",
        "usemulticurrency": false
      }
    }
  }
} 

          

files

Type

Description

Object

Resource that allows the user to upload and attach files to the current task.

Default

            {
  "files": {
    "label": "Files",
    "icon": "paperclip",
    "element": {
      "name": {
        "label": "Name",
        "type": "text",
        "column": 1,
        "title": true,
        "hidden": true
      },
      "document": {
        "label": "size.value ? 'Download' : 'Upload'",
        "type": "file",
        "required": true,
        "readonly": "!!size.value"
      },
      "size": {
        "label": "Size",
        "type": "number",
        "unit": "byte",
        "class": "el-12",
        "column": 3,
        "readonly": true,
        "hidden": "!size.value"
      },
      "description": {
        "label": "Description",
        "type": "textarea",
        "required": true,
        "column": 2
      }
    },
    "article": {
      "record": "file",
      "filters": [
        [
          "formulatext:case when {folder} like '${ event.id }-%-${ user.internalid }' then 'T' else 'F' end",
          "is",
          "T"
        ],
        "or",
        [
          "internalid",
          "anyof",
          {
            "array": true,
            "default": "@NONE@",
            "event": {
              "record": "${ event.record }",
              "filters": [
                "internalid",
                "anyof",
                "${ event.internalid }"
              ],
              "map": "formulatext:{‌file.internalid}"
            }
          }
        ]
      ],
      "filterby": {
        "asset": "${ options.asset || event.asset }"
      },
      "map": {
        "name": "name",
        "document": {
          "id": "internalid",
          "url": "formulatext:'${ url }file/'||{internalid}||'&key=${ user.key }'"
        },
        "description": "formulatext:regexp_replace({description}, '[\r\n]*{[^}]*}$', '')",
        "size": "formulanumeric:{documentsize}*1024|",
        "asset": "formulatext:case when {folder} like '${ event.id }-%-${ user.internalid }' then regexp_replace({folder}, '${ event.id }-(.*)-${ user.internalid }', '\\1') else '${ event.asset }' end"
      },
      "defaults": {
        "record": "${ event.record }",
        "recordid": "${ event.internalid }"
      }
    }
  }
} 

          

history

Type

Description

Object

Resource that shows the service history for the event Asset or one of its child assets.

Default

            {
  "history": {
    "label": "History",
    "icon": "bookmark",
    "hidden": "${ !options.asset && !event.asset }",
    "search": true,
    "remote": true,
    "readonly": true,
    "element": {
      "number": {
        "type": "text",
        "label": "Number",
        "title": true,
        "hidden": true
      },
      "date": {
        "type": "date",
        "label": "Date",
        "class": "el-12 col-right",
        "column": 2
      },
      "assigned": {
        "type": "text",
        "label": "Assigned",
        "class": "el-12"
      },
      "phone": {
        "type": "phone",
        "label": "Phone",
        "class": "el-12"
      },
      "details": {
        "type": "html",
        "label": "Details",
        "column": 1
      },
      "actions": {
        "type": "textarea",
        "label": "Actions"
      },
      "inventory": {
        "type": "table",
        "label": "Inventory"
      },
      "item": {
        "type": "text",
        "label": "Item",
        "class": "col-9 el-9",
        "parent": "inventory",
        "column": 1
      },
      "quantity": {
        "type": "number",
        "label": "Quantity",
        "class": "col-3 el-3",
        "parent": "inventory",
        "column": 2
      },
      "files": {
        "type": "table",
        "label": "Files"
      },
      "name": {
        "type": "text",
        "label": "Name",
        "class": "el-12",
        "parent": "files",
        "title": true,
        "hidden": true,
        "column": 1
      },
      "document": {
        "type": "file",
        "label": "File",
        "parent": "files"
      },
      "size": {
        "type": "number",
        "unit": "byte",
        "label": "Size",
        "class": "el-12",
        "parent": "files",
        "column": 3
      },
      "description": {
        "type": "textarea",
        "label": "Description",
        "parent": "files",
        "column": 2
      }
    },
    "article": {
      "sortby": "date",
      "task": {
        "all": true,
        "record": "task",
        "filters": [
          [
            "custevent_nx_task_asset",
            "anyof",
            "${ options.asset || event.asset }"
          ],
          "and",
          [
            "status",
            "is",
            "COMPLETE"
          ]
        ],
        "map": {
          "number": "custevent_nx_task_number",
          "date": "formuladate:nvl({custevent_nx_start_date},{startdate})[date]",
          "details": "formulatext:'<p>'||{custevent_nx_task_type}||' '||{custevent_nx_task_number}||' '||\t\t\t\t\t\t\t\t\t\tnvl2({‌job.internalid}, ' in '||{job.custentity_nx_project_type}, '')||\t\t\t\t\t\t\t\t\t\tnvl2({‌case.internalid}, ' '||{case.custevent_nx_case_type}||' '||{‌case.casenumber}||'.', '')||\t\t\t\t\t\t\t\t\t\tnvl2({case.custevent_nx_case_details}, ' '||substr({case.custevent_nx_case_details},1,1000), '')||'</p>'||\t\t\t\t\t\t\t\t\t\tnvl2({message}, '<p>'||substr({message},1,1000)||'</p>', '')",
          "actions": "custevent_nx_actions_taken",
          "assigned": "assigned#",
          "phone": "employee.mobilephone"
        }
      },
      "projecttask": false,
      "inventory": {
        "all": true,
        "record": "salesorder",
        "filters": [
          "custcol_nx_asset",
          "anyof",
          "${ options.asset || event.asset }"
        ],
        "map": {
          "id": "*formulatext:nvl2({custcol_nx_task}, 'task-'||{custcol_nx_task.id}, 'projecttask-'||{custcol_nx_projecttask.id})",
          "inventory": [
            {
              "item": "item#",
              "quantity": "quantity"
            }
          ]
        }
      },
      "files": {
        "all": true,
        "record": "file",
        "filters": [
          "formulatext:case when {folder} like '%task-%-${ options.asset || event.asset }-%' then 'T' else 'F' end",
          "is",
          "T"
        ],
        "map": {
          "id": "*formulatext:regexp_replace({folder}, '^([[:alpha:]]*-[[:digit:]]+).*', '\\1')",
          "files": [
            {
              "name": "name",
              "document": {
                "id": "=internalid",
                "url": "formulatext:'${ url }file/'||{internalid}||'&key=${ user.key }'"
              },
              "description": "description",
              "size": "documentsize"
            }
          ]
        }
      }
    }
  }
} 

          

imagesize

Type

Description

Number

Default maximum dimensions of images uploaded from file inputs

Default

            {
  "imagesize": 1080
} 

          

import

Type

Description

Object

JavaScript, JSON, and CSS file paths to append to the head of the document. These files are cached for offline useage and will trigger an update and redownload all files when any import id changes. JSON files are loaded as a JavaScript global named after the import id.

Default

            {
  "import": {}
} 

          

inject

Type

Description

String

Optional HTML to append to the head of the document. Useful for adding styles and scripts for customization.

Default

            {
  "inject": "<!-- Inject -->"
} 

          

inventory

Type

Description

Object

Inventory Resource to load datalists of items that can be used on Task Resources. The configured but unprocessed JSON for these Resources can be accessed in the Mobile Suitelet by navigating the Mobile to the url mobile/task.

Properties

Property

Type

Description

consumable

Object

Datalist element of consumable items available in the Users location.

consumable.options

Object

Object to resolve into array of options. Sorts on the label property.

consumable.options.group

Object

Item Groups.

consumable.options.location

Object

Non Serialized, Non Bin, Non Lot Numbered inventory when Inventory Locations is disabled.

consumable.options.inventorylocation

Object

Non Serialized, Non Bin, Non Lot inventory when Inventory Locations is enabled.

consumable.options.inventorynumber

Object

Serialized or Lot Numbered inventory.

consumable.options.inventorynumberbinonhand

Object

Bin Numbered, Serialized, or Lot Numbered inventory when Advanced Inventory enabled.

consumable.options.binnumber

Object

Bin Numbered, Non Serialized, Non Lot Numbered inventory when Advanced Inventory disabled.

consumable.options.binonhand

Object

Bin Numbered, Non Serialized, Non Lot Numbered inventory when Advanced Inventory enabled.

orderable

Object

Datalist element of orderable and quotable items.

orderable.options

Object

Object to resolve into array of options. Sorts on the label property.

orderable.options.location

Object

Quotable and Orderable items

Default

            {
  "inventory": {
    "label": "Inventory",
    "element": {
      "consumable": {
        "uri": "consumable",
        "type": "datalist",
        "options": {
          "sort": "label",
          "group": {
            "all": true,
            "record": "item",
            "filters": [
              [
                "isinactive",
                "is",
                "F"
              ],
              "and",
              [
                "type",
                "anyof",
                [
                  "Group"
                ]
              ],
              "and",
              [
                "custitem_nx_show_on_mobile",
                "is",
                "T"
              ]
            ],
            "map": {
              "id": "formulatext:'item-'||{internalid}",
              "label": "formulatext:nvl({displayname}, {name})",
              "item": {
                "id": "internalid",
                "label": "formulatext:nvl({displayname}, {name})"
              }
            }
          },
          "location": false,
          "inventorylocation": {
            "all": true,
            "record": "item",
            "filters": [
              [
                "isinactive",
                "is",
                "F"
              ],
              "and",
              [
                "type",
                "anyof",
                [
                  "InvtPart",
                  "Assembly"
                ]
              ],
              "and",
              [
                "custitem_nx_show_on_mobile",
                "is",
                "T"
              ],
              "and",
              [
                "inventorylocation",
                "anyof",
                "${ options.location || user.location }"
              ],
              "and",
              [
                "locationquantityavailable",
                "greaterthan",
                0
              ],
              "and",
              [
                "internalid",
                "noneof",
                "@NONE@"
              ],
              "and",
              [
                "internalid",
                "noneof",
                "@NONE@"
              ],
              "and",
              [
                "internalid",
                "noneof",
                "@NONE@"
              ]
            ],
            "map": {
              "id": "formulatext:'item-'||{internalid}||'-'||{‌inventorylocation.internalid}||'--'",
              "label": "formulatext:nvl({displayname}, {name})",
              "item": {
                "id": "internalid",
                "label": "formulatext:nvl({displayname}, {name})"
              },
              "location": {
                "id": "inventorylocation",
                "label": "inventorylocation#"
              },
              "available": "locationquantityavailable"
            }
          },
          "inventorynumber": false,
          "inventorynumberbinonhand": false,
          "binnumber": false,
          "binonhand": false
        }
      },
      "kit": {
        "uri": "kit",
        "type": "datalist",
        "options": {
          "all": true,
          "record": "item",
          "filters": [
            [
              "isinactive",
              "is",
              "F"
            ],
            "and",
            [
              "type",
              "anyof",
              [
                "Kit"
              ]
            ],
            "and",
            [
              "custitem_nx_show_on_mobile",
              "is",
              "T"
            ]
          ],
          "map": {
            "id": "*formulatext:'item-'||{internalid}",
            "item": {
              "id": "internalid",
              "label": "formulatext:nvl({displayname}, {name})"
            },
            "components": [
              {
                "id": "formulatext:'item-'||{‌memberitem.internalid}",
                "item": {
                  "id": "memberitem",
                  "label": "formulatext:nvl({‌memberitem.displayname}, {‌memberitem.name})"
                },
                "quantity": "memberquantity",
                "type": "memberitem.type"
              }
            ]
          }
        }
      },
      "orderable": {
        "uri": "orderable",
        "type": "datalist",
        "options": {
          "sort": "label",
          "subtotal": {
            "id": -2,
            "label": "Subtotal",
            "description": "",
            "min": 0
          },
          "location": {
            "record": "item",
            "filters": [
              [
                "isinactive",
                "is",
                "F"
              ],
              "and",
              [
                [
                  "type",
                  "is",
                  "Discount"
                ],
                "or",
                [
                  "custitem_nx_show_on_mobile",
                  "is",
                  "T"
                ]
              ]
            ],
            "map": {
              "id": "internalid",
              "label": "formulatext:nvl({displayname}, {name})",
              "description": "salesdescription",
              "min": "formulatext:nvl({minimumquantity}, 1)"
            }
          }
        }
      },
      "receivable": {
        "uri": "receivable",
        "type": "datalist",
        "options": {
          "sort": "id",
          "transferpricecostingfalse": {
            "record": "transferorder",
            "filters": [
              [
                "transferlocation",
                "is",
                "${ options.location || user.location }"
              ],
              "and",
              [
                "status",
                "anyof",
                [
                  "TrnfrOrd:F",
                  "TrnfrOrd:E"
                ]
              ],
              "and",
              [
                "formulanumeric:nvl({transferorderquantityshipped},0)",
                "greaterthan",
                "0"
              ],
              "and",
              [
                "mainline",
                "is",
                "F"
              ],
              "and",
              [
                "istransferpricecosting",
                "is",
                "F"
              ]
            ],
            "map": {
              "id": "internalid",
              "label": "formulatext:'Transfer Order #'||{tranid}",
              "item": {
                "id": "item",
                "label": "#item"
              },
              "quantity": "transferorderquantityshipped",
              "transferorder": "internalid"
            }
          },
          "transferpricecostingtrue": {
            "record": "itemfulfillment",
            "filters": [
              [
                "createdfrom.transferlocation",
                "is",
                "${ options.location || user.location }"
              ],
              "and",
              [
                "createdfrom.status",
                "anyof",
                [
                  "TrnfrOrd:F",
                  "TrnfrOrd:E"
                ]
              ],
              "and",
              [
                "formulatext:case when {account} is null and lower({item.type.id}) not in ('taxitem', 'taxgroup', 'shipitem') then 'T' else 'F' end",
                "is",
                "T"
              ],
              "and",
              [
                "createdfrom.istransferpricecosting",
                "is",
                "T"
              ],
              "and",
              [
                "createdfrom.recordtype",
                "is",
                "transferorder"
              ],
              "and",
              [
                "internalid",
                "noneof",
                {
                  "array": true,
                  "default": "@NONE@",
                  "received": {
                    "record": "itemreceipt",
                    "filters": [
                      [
                        "createdfrom.transferlocation",
                        "is",
                        "${ options.location || user.location }"
                      ],
                      "and",
                      [
                        "createdfrom.status",
                        "anyof",
                        [
                          "TrnfrOrd:F",
                          "TrnfrOrd:E"
                        ]
                      ],
                      "and",
                      [
                        "createdfrom.recordtype",
                        "is",
                        "transferorder"
                      ],
                      "and",
                      [
                        "appliedtotransaction.recordtype",
                        "is",
                        "itemfulfillment"
                      ]
                    ],
                    "map": "appliedtotransaction"
                  }
                }
              ]
            ],
            "map": {
              "id": "formulatext:{‌createdfrom.id}||'-'||{internalid}",
              "label": "formulatext:'Transfer Order #'||{‌createdfrom.tranid}||' - Item Fulfillment #'||{tranid}",
              "item": {
                "id": "item",
                "label": "#item"
              },
              "quantity": "quantity",
              "transferorder": "createdfrom",
              "itemfulfillment": "internalid"
            }
          }
        }
      }
    }
  }
} 

          

notes

Type

Description

Object

Resource that allows the user to create notes against the current event.

Default

            {
  "notes": {
    "label": "Notes",
    "icon": "comment",
    "element": {
      "title": {
        "type": "text",
        "label": "Title",
        "class": "el-12",
        "required": true,
        "column": 1
      },
      "body": {
        "type": "richtext",
        "label": "Message",
        "class": "el-12",
        "required": true
      },
      "date": {
        "type": "date",
        "label": "Date",
        "value": "${ event.date }",
        "title": true,
        "column": 2,
        "hidden": true
      }
    },
    "article": {
      "record": "note",
      "filters": [
        "internalid",
        "anyof",
        {
          "array": true,
          "default": "@NONE@",
          "event": {
            "record": "${ event.record }",
            "filters": [
              [
                "internalid",
                "anyof",
                "${ event.internalid }"
              ],
              "and",
              [
                "usernotes.author",
                "anyof",
                "${ user.internalid }"
              ]
            ],
            "map": "usernotes.internalid"
          }
        }
      ],
      "filterby": {
        "asset": "${ options.asset || event.asset }"
      },
      "map": {
        "date": "notedate|",
        "author": "author",
        "title": "title",
        "body": "note",
        "asset": "custrecord_nx_asset"
      },
      "idempotencyField": "custrecord_nx_note_idempotency_key",
      "defaults": {
        "author": "${ user.internalid }",
        "activity": "${ event.internalid }",
        "asset": "${ options.asset || event.asset }"
      }
    }
  }
} 

          

onsite

Type

Description

Number

Distance in kilometers that a Resource is considered on site for an Event.

Default

            {
  "onsite": 0.5
} 

          

order

Type

Description

Order disabled when the order is pending receipt

Default

            {
  "order": {
    "label": "Order",
    "hidden": false,
    "icon": "shoppingcart",
    "element": {
      "tranid": {
        "type": "text",
        "label": "Transaction",
        "hidden": true,
        "title": true,
        "column": 1
      },
      "location": {
        "type": "select",
        "label": "From",
        "class": "el-9",
        "required": true,
        "column": 2,
        "options": {
          "record": "location",
          "filters": [
            [
              "internalid",
              "noneof",
              "${ user.location }"
            ],
            "and",
            [
              "subsidiary",
              "anyof",
              "${ user.subsidiary }"
            ]
          ],
          "map": {
            "id": "internalid",
            "label": "name",
            "selected": "formulatext:case when {internalid} = '${ user.warehouse }' then 'A' end"
          }
        }
      },
      "items": {
        "type": "table",
        "label": "Items",
        "required": true
      },
      "item": {
        "type": "select",
        "label": "Item",
        "class": "el-9",
        "search": true,
        "required": true,
        "column": 1,
        "options": "orderable.options",
        "parent": "items"
      },
      "quantity": {
        "type": "integer",
        "label": "Quantity",
        "class": "el-3",
        "min": 1,
        "step": 1,
        "required": true,
        "column": 2,
        "parent": "items"
      },
      "status": {
        "type": "text",
        "label": "Status",
        "class": "el-12",
        "readonly": true,
        "column": 2,
        "value": "Open"
      }
    },
    "article": {
      "extend": "models/transaction",
      "record": "transferorder",
      "filters": [
        [
          [
            "custbody_nx_task",
            "anyof",
            "${ event.internalid }"
          ],
          "or",
          [
            "custbody_nx_projecttask",
            "anyof",
            "${ event.internalid }"
          ]
        ],
        "and",
        [
          "requestor.internalid",
          "is",
          "${ user.internalid }"
        ],
        "and",
        [
          "transferlocation",
          "is",
          "${ user.location }"
        ]
      ],
      "map": {
        "id": "*formulatext:case when {line} > 0 and {transferorderitemline} is null then {internalid} end|internalid",
        "tranid": "tranid|",
        "status": "status#|",
        "location": {
          "id": "=location",
          "label": "#location|"
        },
        "readonly": "formulatext:case when {‌status.id} like 'pendingReceipt%' then 'T' else 'F' end",
        "items": [
          {
            "line": "line|item.line",
            "item": {
              "id": "=item|item.item",
              "label": "#item|"
            },
            "quantity": "formulanumeric:abs({quantity})|item.quantity"
          }
        ]
      },
      "defaults": {
        "subsidiary": "${ user.subsidiary }",
        "employee": "${ user.internalid }",
        "transferlocation": "${ user.location }",
        "trandate": "${ event.date }",
        "custbody_nx_customer": "${ event.customer }",
        "custbody_nx_task": "${ event.crmtask }",
        "custbody_nx_projecttask": "${ event.projecttask }",
        "custbody_nx_case": "${ event.supportcase }"
      }
    }
  }
} 

          

quote

Type

Description

Quotes

Default

            {
  "quote": {
    "label": "Quote",
    "icon": "quote",
    "element": {
      "items": {
        "type": "table",
        "label": "Items",
        "required": true
      },
      "item": {
        "type": "select",
        "label": "Item",
        "class": "col-0 col-sm el-9",
        "required": true,
        "search": true,
        "parent": "items",
        "column": 1,
        "options": "orderable.options"
      },
      "quantity": {
        "type": "integer",
        "label": "Qty",
        "class": "el-3",
        "min": "item.value ? orderable.options.filter(o=>{ return o.id == item.value.id })[0].min : undefined",
        "value": 1,
        "required": true,
        "parent": "items",
        "column": 3
      },
      "description": {
        "type": "text",
        "label": "Description",
        "parent": "items",
        "column": 2,
        "value": "item.value ? orderable.options.filter(o=>{ return o.id == item.value.id })[0].description : ''"
      },
      "amount": {
        "type": "currency",
        "label": "Amount",
        "hidden": true,
        "parent": "items",
        "column": 4
      },
      "taskcol": {
        "type": "hidden",
        "value": "${ event.crmtask }",
        "parent": "items"
      },
      "projecttaskcol": {
        "type": "hidden",
        "value": "${ event.projecttask }",
        "parent": "items"
      },
      "assetcol": {
        "type": "hidden",
        "value": "${ event.asset }",
        "parent": "items"
      },
      "total": {
        "type": "currency",
        "label": "Total",
        "class": "el-12",
        "readonly": true,
        "column": 4
      },
      "purchaseorder": {
        "type": "text",
        "label": "PO#",
        "class": "el-12",
        "maxlength": 45
      },
      "status": {
        "type": "text",
        "label": "Status",
        "class": "el-12",
        "readonly": true,
        "column": 2,
        "value": "Open"
      },
      "tranid": {
        "type": "text",
        "label": "Transaction",
        "hidden": true,
        "title": true,
        "column": 1
      },
      "task": {
        "type": "text",
        "value": "${ event.internalid }",
        "hidden": true
      },
      "sendemail": {
        "type": "checkbox",
        "label": "Send Email",
        "class": "el-12"
      },
      "emailto": {
        "type": "text",
        "label": "Emails",
        "class": "el-12",
        "required": true,
        "value": "${ event.email }",
        "pattern": "((^|;)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,3})+$"
      },
      "apply": {
        "type": "checkbox",
        "label": "Apply to current job",
        "class": "el-12",
        "column": 3
      },
      "signature": {
        "type": "signature",
        "label": "Sign to create Sales Order"
      }
    },
    "article": {
      "extend": "models/transaction",
      "record": "estimate",
      "filters": [
        [
          "recordtype",
          "is",
          "estimate"
        ],
        "and",
        [
          [
            "custbody_nx_task",
            "is",
            "${ event.internalid }"
          ],
          "or",
          [
            "custbody_nx_projecttask",
            "is",
            "${ event.internalid }"
          ],
          "or",
          [
            "formulatext:case when ({‌job.internalid} = '${ event.job }') and {custbody_nx_case.internalid} = '${ event.supportcase }' then 'T' else 'F' end",
            "is",
            "T"
          ]
        ]
      ],
      "map": {
        "id": "*formulatext:case when lower({item.type.id}) not in ('taxitem', 'taxgroup', 'shipitem') then {internalid} end|internalid",
        "readonly": "formulatext:case when {‌status.id} like 'processed' then 'T' else 'F' end",
        "tranid": "tranid|",
        "status": "status#|",
        "purchaseorder": "otherrefnum",
        "total": "total|",
        "apply": "formulatext:case when {‌job.internalid} = '${ event.job }' then 'T' else 'F' end",
        "signature": "custbody_nx_customer_signature",
        "sendemail": "tobeemailed",
        "emailto": "email",
        "items": [
          {
            "line": "line|item.line",
            "description": "memo|item.description",
            "item": {
              "id": "=item|item.item",
              "label": "#item|"
            },
            "quantity": "formulatext:nvl({quantity},1)|item.quantity",
            "amount": "amount|",
            "readonly": "formulatext:case when ({custcol_nx_task.internalid} = '${ event.internalid }' or {custcol_nx_projecttask.internalid} = '${ event.internalid }') then 'F' else 'T' end",
            "taskcol": "custcol_nx_task|item.custcol_nx_task",
            "projecttaskcol": "custcol_nx_projecttask|item.custcol_nx_projecttask",
            "assetcol": "custcol_nx_asset|item.custcol_nx_asset"
          }
        ]
      },
      "defaults": {
        "customer": "${ event.customer }",
        "trandate": "${ event.date }",
        "custbody_nx_customer": "${ event.customer }",
        "custbody_nx_task": "${ event.crmtask }",
        "custbody_nx_projecttask": "${ event.projecttask }"
      },
      "initialize": {
        "copy": "copy",
        "createdfrom": "transform",
        "createdfromtype": "transformtype",
        "recordmode": "recordmode",
        "customform": "customform",
        "subsidiary": "subsidiary"
      },
      "syncentity": true
    }
  }
} 

          

receive

Type

Description

Receive No bin selection

Default

            {
  "receive": {
    "label": "Receive",
    "hidden": false,
    "icon": "inbox",
    "element": {
      "tranid": {
        "type": "text",
        "label": "Transaction",
        "hidden": true,
        "title": true,
        "column": 1
      },
      "createdfrom": {
        "label": "Order",
        "type": "select",
        "required": true,
        "search": true,
        "column": 2,
        "readonly": "!!tranid.value",
        "options": "_.uniq(receivable.options, o=>{return o.id})",
        "autoselect": false
      },
      "transferorder": {
        "type": "text",
        "label": "Transfer Order Id",
        "hidden": true,
        "value": "createdfrom.value ? (receivable.options.filter(o => { return o.id == createdfrom.value.id })[0] || {}).transferorder : null"
      },
      "itemfulfillment": {
        "type": "text",
        "label": "Item Fulfillment Id",
        "hidden": true,
        "value": "createdfrom.value ? (receivable.options.filter(o => { return o.id == createdfrom.value.id })[0] || {}).itemfulfillment : null"
      },
      "items": {
        "type": "table",
        "label": "Items",
        "readonly": true,
        "value": "createdfrom.value ? receivable.options.filter(o => { return o.id == createdfrom.value.id }).map(o => ({ item: o.item, quantity: o.quantity })) : []"
      },
      "item": {
        "type": "select",
        "label": "Item",
        "class": "el-9",
        "column": 1,
        "parent": "items"
      },
      "quantity": {
        "type": "integer",
        "label": "Quantity",
        "class": "el-3",
        "step": 1,
        "column": 2,
        "parent": "items"
      }
    },
    "article": {
      "extend": "models/transaction",
      "record": "itemreceipt",
      "filters": [
        [
          [
            "custbody_nx_task",
            "anyof",
            "${ event.internalid }"
          ],
          "or",
          [
            "custbody_nx_projecttask",
            "anyof",
            "${ event.internalid }"
          ]
        ],
        "and",
        [
          "location",
          "is",
          "${ user.location }"
        ]
      ],
      "map": {
        "id": "*formulatext:case when ({line} > 0 and {quantity} > 0) then {internalid} end|internalid",
        "tranid": "tranid|",
        "status": "status#|",
        "createdfrom": {
          "id": "=createdfrom|",
          "label": "#createdfrom|"
        },
        "items": [
          {
            "quantity": "quantity|item.quantity",
            "item": {
              "id": "=item|item.item",
              "label": "#item|"
            }
          }
        ]
      }
    }
  }
} 

          

return

Type

Description

Return Transfer orders transferring from the user location

Default

            {
  "return": {
    "label": "Return",
    "hidden": false,
    "icon": "outbox",
    "element": {
      "tranid": {
        "type": "text",
        "label": "Transaction",
        "hidden": true,
        "title": true,
        "column": 1
      },
      "transferlocation": {
        "type": "select",
        "label": "To",
        "required": true,
        "options": {
          "record": "location",
          "filters": [
            [
              "internalid",
              "noneof",
              "${ user.location }"
            ],
            "and",
            [
              "subsidiary",
              "anyof",
              "${ user.subsidiary }"
            ]
          ],
          "map": {
            "id": "internalid",
            "label": "name",
            "selected": "formulatext:case when {internalid} = '${ user.warehouse }' then 'A' end"
          }
        }
      },
      "items": {
        "type": "table",
        "label": "Items",
        "required": true
      },
      "item": {
        "label": "Item",
        "parent": "items",
        "type": "select",
        "class": "col-sm el-9",
        "required": true,
        "search": true,
        "barcode": true,
        "column": 1,
        "options": "_.uniq(consumable.options.filter(o=>{return o.location && (o.location.id == item.location)}).map(o=>{return o.item}), o=>{return o.id})",
        "location": "${ user.location }"
      },
      "quantity": {
        "type": "integer",
        "label": "Qty",
        "class": "el-3",
        "min": 1,
        "step": 1,
        "value": 1,
        "required": true,
        "parent": "items",
        "column": 5
      },
      "bin": {
        "type": "select",
        "label": "Bin",
        "class": "col-xs-0 col-sm-0 col-md-0",
        "parent": "items",
        "hidden": "!(bin.value || bin.options.length)",
        "options": "item.value ? _.uniq(consumable.options.filter(o=>{ return (o.item.id == item.value.id) && o.bin && o.location && (o.location.id == item.location) }).map(o=>{return o.bin}), o=>{return o.id}) : []"
      },
      "lot": {
        "type": "select",
        "label": "Lot",
        "class": "col-xs-0 col-sm-0 col-md-0",
        "parent": "items",
        "hidden": "!(lot.value || lot.options.length)",
        "options": "item.value ? _.uniq(consumable.options.filter(o=>{ return (o.item.id == item.value.id) && o.lot && o.location && (o.location.id == item.location) && ((o.bin && o.bin.id) == (bin.value && bin.value.id)) }).map(o=>{return o.lot}), o=>{return o.id}) : []"
      },
      "serial": {
        "type": "select",
        "multiple": true,
        "search": true,
        "barcode": true,
        "label": "Serial",
        "parent": "items",
        "class": "col-xs-0",
        "column": 3,
        "hidden": "!(serial.value.length || serial.options.length)",
        "options": "item.value ? _.uniq(consumable.options.filter(o=>{ return (o.item.id == item.value.id) && o.serial && o.location && (o.location.id == item.location) && ((o.bin && o.bin.id) == (bin.value && bin.value.id)) }).map(o=>{return o.serial}), o=>{return o.id}) : []"
      },
      "status": {
        "type": "text",
        "label": "Status",
        "class": "el-12",
        "readonly": true,
        "column": 2,
        "value": "Open"
      }
    },
    "article": {
      "extend": "models/transaction",
      "record": "transferorder",
      "filters": [
        [
          [
            "custbody_nx_task",
            "anyof",
            "${ event.internalid }"
          ],
          "or",
          [
            "custbody_nx_projecttask",
            "anyof",
            "${ event.internalid }"
          ]
        ],
        "and",
        [
          "requestor.internalid",
          "is",
          "${ user.internalid }"
        ],
        "and",
        [
          "location",
          "anyof",
          "${ user.location }"
        ]
      ],
      "map": {
        "id": "*formulatext:case when {line} > 0 and {transferorderitemline} is null then {internalid} end|internalid",
        "tranid": "tranid|",
        "status": "status#|",
        "transferlocation": {
          "id": "=transferlocation",
          "label": "#transferlocation|"
        },
        "items": [
          {
            "line": "line|item.line",
            "item": {
              "id": "=item|item.item",
              "label": "#item|"
            },
            "quantity": "formulanumeric:abs({quantity})|item.quantity"
          }
        ]
      },
      "defaults": {
        "orderstatus": "B",
        "subsidiary": "${ user.subsidiary }",
        "employee": "${ user.internalid }",
        "location": "${ user.location }",
        "trandate": "${ event.date }",
        "custbody_nx_customer": "${ event.customer }",
        "custbody_nx_task": "${ event.crmtask }",
        "custbody_nx_projecttask": "${ event.projecttask }",
        "custbody_nx_case": "${ event.supportcase }"
      },
      "fulfill": true,
      "inventory": "items"
    }
  }
} 

          

salesorder

Sales Order resource allows users to view or edit Sales Orders in the field. Default configuration shows the first Sales Order found on the current project. Item group header and footer lines and those not created from this task on the mobile are readonly. Lines that are added or edited from the current task that are fulfillable will automatically be fulfilled on save.

Known Issues

  • Deleting sales order lines in or above item groups will cause a syncing error.

  • Multiple users concurrently editing the Sales Order could overwrite changes.

  • Accounts with basic inventory will fulfill Bin items but not show on the Sales Order line.

  • Maximum quantity not enforced based on item availability at selected location. This could put the item in backorder or cause a syncing error with inventory detail.

  • Does not show tax or shipping line.

  • Does not apply billing rule logic.

Deafult

            {
  "salesorder": {
    "label": "Sales Order",
    "icon": "wrench",
    "max": 1,
    "element": {
      "items": {
        "type": "table",
        "label": "Items",
        "required": true
      },
      "item": {
        "label": "Item",
        "parent": "items",
        "type": "select",
        "class": "col-sm el-9",
        "required": true,
        "search": true,
        "barcode": true,
        "column": 1,
        "options": "_.uniq(consumable.options.concat(kit.options).map(o=>{return {...o.item, barcode: o.barcode}}), o=>{return o.id})",
        "component": "var kititem = item.value && kit.options.filter(o=>{return o.item.id == item.value.id })[0]; return kititem ? kititem.components : []",
        "stocked": "item.value ? (item.component.length ? item.component.filter(o=>{ return ~['InvtPart','Assembly'].indexOf(o.type) }).map(o=>{ return o.item.id }) : [item.value.id]) : []",
        "assignment": "consumable.options.filter(o=>{ return o.location && ~item.stocked.indexOf(o.item.id) })",
        "location": "var locations = {}; item.assignment.map(o=>{ var id = o.location.id; if (!locations[id]) locations[id] = { location: o.location, stock: [] }; if (!~locations[id].stock.indexOf(o.item.id)) locations[id].stock.push(o.item.id); return o }); return locations"
      },
      "quantity": {
        "type": "integer",
        "label": "Qty",
        "class": "el-3",
        "min": 1,
        "step": 1,
        "value": 1,
        "required": true,
        "parent": "items",
        "column": 5
      },
      "location": {
        "type": "select",
        "label": "Location",
        "parent": "items",
        "class": "col-xs-0 col-sm-0",
        "column": 2,
        "hidden": "!(location.value || location.options.length)",
        "options": "Object.keys(item.location).filter(id=>{ return item.location[id].stock.length == item.stocked.length }).map(id=>{ return item.location[id].location })"
      },
      "bin": {
        "type": "select",
        "label": "Bin",
        "class": "col-xs-0 col-sm-0 col-md-0",
        "parent": "items",
        "hidden": "!(bin.value || bin.options.length)",
        "options": "(item.value && location.value) ? _.uniq(consumable.options.filter(o=>{ return (o.item.id == item.value.id) && o.bin && o.location && (o.location.id == location.value.id) }).map(o=>{return o.bin}), o=>{return o.id}) : []"
      },
      "lot": {
        "type": "select",
        "label": "Lot",
        "class": "col-xs-0 col-sm-0 col-md-0",
        "parent": "items",
        "hidden": "!(lot.value || lot.options.length)",
        "options": "(item.value && location.value) ? _.uniq(consumable.options.filter(o=>{ return (o.item.id == item.value.id) && o.lot && o.location && (o.location.id == location.value.id) && ((o.bin && o.bin.id) == (bin.value && bin.value.id)) }).map(o=>{return o.lot}), o=>{return o.id}) : []"
      },
      "serial": {
        "type": "select",
        "multiple": true,
        "search": true,
        "barcode": true,
        "label": "Serial",
        "parent": "items",
        "class": "col-xs-0",
        "column": 3,
        "hidden": "!(serial.value.length || serial.options.length)",
        "options": "(item.value && location.value) ? _.uniq(consumable.options.filter(o=>{ return (o.item.id == item.value.id) && o.serial && o.location && (o.location.id == location.value.id) && ((o.bin && o.bin.id) == (bin.value && bin.value.id)) }).map(o=>{return o.serial}), o=>{return o.id}) : []"
      },
      "amount": {
        "type": "currency",
        "label": "Amount",
        "class": "col-right",
        "hidden": true,
        "parent": "items",
        "column": 6
      },
      "task": {
        "type": "hidden",
        "value": "${ event.crmtask }",
        "parent": "items"
      },
      "projecttask": {
        "type": "hidden",
        "value": "${ event.projecttask }",
        "parent": "items"
      },
      "asset": {
        "type": "hidden",
        "value": "${ event.asset }",
        "parent": "items"
      },
      "total": {
        "type": "currency",
        "label": "Total",
        "class": "el-12",
        "readonly": true,
        "column": 4
      },
      "status": {
        "type": "text",
        "label": "Status",
        "class": "el-12",
        "readonly": true,
        "column": 2,
        "value": "Pending Fulfillment"
      },
      "tranid": {
        "type": "text",
        "label": "Transaction",
        "hidden": true,
        "title": true
      }
    },
    "article": {
      "extend": "models/transaction",
      "record": "salesorder",
      "filters": "${ event.company && event.company != event.customer ? ['job.internalid', 'anyof', event.company] : ['custbody_nx_task', 'anyof', event.crmtask || 0] }",
      "map": {
        "id": "*formulatext:case when lower({item.type.id}) not in ('taxitem', 'taxgroup', 'shipitem') then {internalid} end|internalid",
        "project": "job.internalid|entity",
        "customer": "custbody_nx_customer",
        "tranid": "tranid|",
        "status": "status#|",
        "total": "total|",
        "items": [
          {
            "line": "line|item.line",
            "task": "custcol_nx_task|item.custcol_nx_task",
            "asset": "custcol_nx_asset|item.custcol_nx_asset",
            "readonly": "formulatext:case when {item.type.id} like '%Group%' then 'T' when ({custcol_nx_task.id} = '${ event.internalid }' or {custcol_nx_projecttask.id} = '${ event.internalid }') then 'F' else 'T' end",
            "item": {
              "id": "=item|item.item",
              "label": "item#|"
            },
            "location": {
              "id": "=location|item.location",
              "label": "formulatext:regexp_replace({location}, '.* : ')|"
            },
            "quantity": "quantity|item.quantity",
            "amount": "amount|"
          }
        ]
      },
      "defaults": {
        "customer": "${ event.customer }",
        "project": "${ event.company == event.customer ? null : event.company }",
        "trandate": "${ event.date }",
        "custbody_nx_task": "${ event.crmtask }",
        "custbody_nx_projecttask": "${ event.projecttask }",
        "custbody_nx_case": "${ event.supportcase }",
        "custbody_nx_asset": "${ event.asset }",
        "orderstatus": "B",
        "iscrosssubtransaction": true
      },
      "initialize": {
        "copy": "copy",
        "createdfrom": "transform",
        "createdfromtype": "transformtype",
        "recordmode": "recordmode",
        "customform": "customform",
        "subsidiary": "subsidiary"
      },
      "syncentity": true,
      "fulfill": true,
      "inventory": "items"
    }
  }
} 

          

times

Type

Description

Object

Resource that allows the user to log time.

Default

            {
  "times": {
    "label": "Time",
    "icon": "clock",
    "element": {
      "item": {
        "type": "select",
        "label": "Item",
        "class": "el-6",
        "search": true,
        "required": true,
        "column": 1,
        "options": {
          "sort": "label",
          "serviceitems": {
            "record": "item",
            "filters": [
              [
                "isinactive",
                "is",
                "F"
              ],
              "and",
              [
                "type",
                "anyof",
                "Service"
              ],
              "and",
              [
                "custitem_nx_show_on_mobile",
                "is",
                "T"
              ]
            ],
            "map": {
              "id": "internalid",
              "label": "name"
            }
          }
        }
      },
      "date": {
        "type": "date",
        "label": "Date",
        "class": "el-3",
        "hidden": "${ event.crmtask }",
        "column": 2,
        "value": "${ event.date }"
      },
      "duration": {
        "type": "float",
        "label": "Hours",
        "class": "el-3",
        "min": 0.1,
        "max": 24,
        "step": 0.1,
        "column": 3,
        "required": true
      }
    },
    "article": {
      "record": "timebill",
      "filters": [
        [
          "${ event.record }.internalid",
          "anyof",
          "${ event.internalid }"
        ],
        "and",
        [
          "employee",
          "anyof",
          "${ user.internalid }"
        ]
      ],
      "filterby": {
        "asset": "${ options.asset || event.asset }"
      },
      "map": {
        "duration": "durationdecimal|hours",
        "item": {
          "id": "=item.internalid|item",
          "label": "item.name|"
        },
        "date": "date|trandate",
        "asset": "custcol_nx_asset"
      },
      "idempotencyField": "custcol_nx_idempotency_key",
      "defaults": {
        "casetaskevent": "${ event.internalid }",
        "custcol_nx_task": "${ event.crmtask }",
        "custcol_nx_projecttask": "${ event.projecttask }",
        "asset": "${ options.asset || event.asset }",
        "customer": "${ event.company }",
        "employee": "${ user.internalid }"
      }
    }
  }
} 

          

user

Type

Description

Object

Records in NetSuite that are considered Mobile Users. This is a hash of Model definitions that relate a user to a record. Any model properties or functions can be defined including the sync function.

Properties

Property

Type

Description

record

String

Record type

filters

Filterexpression

Search filters to apply to the record type

map

Object

Field map of search columns and fields. These attributes will be available in definitions for resources using the template tag {user.*}. They are also used to match on resource rule lookups.

map.id

String

Must be in the pattern of "{recordtype}-{internalid}".

map.label

String

Name to show for the User

map.email

String

Email address to identify the User for Authentication

map.password

String

Encrypted password to use for Authentication when the User does not have NetSuite access.

map.latitude

Number

Latitude of the user.

map.longitude

Number

Longitude of the user.

map.language

String

Language preference for the User in NetSuite format language values. Requests for the User, Event, it's Resources, and its Articles will be run in this timezone.

map.*

*

Optional additional attributes can be added to make available for resource lookups and variables.

resources

Array.<object>

Set of rules to lookup which Resources to load for the user. Properties added to the rules will filter the attribute on the user.

resources[].resources

Array.<string>

Resource ids to load for the containing rule.

Default

            {
  "user": {
    "employee": {
      "record": "employee",
      "filters": [
        [
          "isinactive",
          "is",
          "F"
        ],
        "and",
        [
          [
            "custentity_nx_mobile_user",
            "is",
            "T"
          ],
          "or",
          [
            "formulatext:case when regexp_like({email}, '${ license.administrator }', 'i') then 'T' else 'F' end",
            "is",
            "T"
          ]
        ]
      ],
      "map": {
        "label": "formulatext:nvl(trim(trim(trim({firstname})||' '||{middlename})||' '||{lastname}), {entityid})",
        "email": "email|",
        "password": "custentity_nx_password|",
        "giveaccess": "giveaccess|",
        "latitude": "custentity_nx_latitude",
        "longitude": "custentity_nx_longitude",
        "language": "formulatext:''",
        "image": "formulatext:nvl2({image}, '${ url }file/'||{‌image.id}, '')",
        "location": "formulatext:nvl({custentity_nx_location.id}, 0)",
        "warehouse": "formulatext:nvl({custentity_nx_warehouse.id}, 0)",
        "subsidiary": "subsidiary|",
        "createevent": "${ server.addable }"
      },
      "resources": [
        {
          "resources": [
            "inventory"
          ]
        }
      ]
    }
  }
} 

          

General Notices