/*
* AppScript Cheat Sheet
* Find examples of many common operations and tasks
*/
// Update a value on the triggered record
currentValues["Customer"] = "John Smith";
currentValues["Age"] = 123;
// Update a value on the parent record
currentValues["Link to Parent"]["Parent Status"] = "Active";
currentValues["Link to Parent"]["Parent Amount"] = 123;
// Update a value on the grandparent record
currentValues["Link to Parent"]["Link to Grandparent"]["Grandparent Address"] = "123 Main Street";
currentValues["Link to Parent"]["Link to Grandparent"]["Grandparent Zipcode"] = "12345";
// Fetch a value from a parent record
String parentStatus = currentValues["Link to Parent"]["Status"];
Int masterZip = currentValues["Link to Parent"]["Zipcode"];
// Add a child record to parent record
addChild("Child Table", "Relationship Name", ["name":"John Smith", "Age":42]);
// Update a value in a child record
List