c_SSPCommonData

Description

Common functions for interacting with the data layer

Methods


<static> parseAsRecordObject( record ) → {Object}

Description

Rewrites an object to have only save attributes for usage in a GlideQuery call

Parameters
Name Type Description
record Object
Returns

<static> getRecordById( sysId, table [, fields ] ) → {Object|undefined}

Description

Retrieve a record by sys_id

Parameters
Name Type Attributes Description
sysId sys_id

Sys id of the record

table string

Table name, use c_SSPPortalData.TABLES for an enumerated list of supported tables

fields Array.<string> <optional>

Fields to return in the record object, when undefined only sys_id si returned

Returns

<static> insert( table, recordObject, fields ) → {Object|undefined}

Description

Insert a record and return the resulting record with the fields mentioned in fields, returns undefined when there is no result

Parameters
Name Type Description
table string
recordObject Object

JSON objects with field: value pairs

fields Array.<string>

Array of fields to return as properties in the resulting record.

Returns