Save Record
Description
Create a new record in the provided table.
Returns
Collection of record data created for new record.
Usage
Map record = save("<TableName>", ["<FieldName>": "<FieldValue>"]);
Load Record
Description
Load an existing record via matching field name/value or collection of matching field names/values.
Returns
Collection of record data for loaded record
Usage
Map record = loadRecord("Table", "Field", "Value");
Map record = loadRecord("Table", ["Field": "Value", "Field": "Value"]);
Load Application User
Description
Load an existing application user matching field names/values.
Returns
Collection of record data for loaded user
Usage
Map user = loadRecord("Account Users", "Email", "johnsmith@email.com");
currentValues["Assigned User"] = user;
Load Application User Group
Description
Load an existing application user group matching field names/values.
Returns
Collection of record data for loaded user
Usage
// Lookup existing application user group
Map group = loadRecord("XVIA_USER_GROUP", "group_name", "(group-name-value-here)");
// Set record's assigned group to found group
currentValues["Assigned Group"] = group
Update Record
Description
Update an existing record for a given table by field and value.
Returns
Collection of record data for updated record
Usage
Map record = loadRecord("Table", "Field", "Value");
record["Field"] = "NewValue";
update(record);
Delete Record
Description
Delete an existing record fUpdate an existing record for a given table by field and value.
Returns
Collection of record data for updated record
Usage
console.log('Hello World!');
Child Records
Add Child
Description
Create a new child record related to an existing record.
Returns
Void response after successfuly creating child.
Usage
addChild("Child Table", "Relationship.Name", ["Record Field": "Value"]);
addChild("Child Table", "Link to Parent", ["Field": "Value"]);
Load Children
Description
Fetch the children associated with the existing linked record.
Returns
List of matching children.
Usage
// Lookup children
List<Map> children = getChildren("Child Table Name", "Link to Parent Field");
// Iterate children
children.each { child ->
// Perform action on each iteration
}
Comments
0 comments
Please sign in to leave a comment.