Skip to content

Commit 79070d4

Browse files
committed
Support disabling managed columns from a trigger
1 parent a857bf5 commit 79070d4

File tree

1 file changed

+12
-6
lines changed
  • modules/simpletest/resources/queries/lists

1 file changed

+12
-6
lines changed

modules/simpletest/resources/queries/lists/People.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ function stripPrefix(row)
2424
}
2525
}
2626

27+
// Disable managed columns from a script
28+
function managedColumns() {
29+
return false;
30+
}
31+
2732
function beforeInsert(row, errors)
2833
{
2934
// Test row map is case-insensitive
@@ -32,12 +37,9 @@ function beforeInsert(row, errors)
3237

3338
stripPrefix(row);
3439

35-
// var result = LABKEY.Query.deleteRows({
36-
// schemaName: "lists",
37-
// queryName: "People",
38-
// rowDataArray: [{Key: 100}]
39-
// });
40-
// console.log("Result of deleteRows: ", result);
40+
// Test disabling managed columns from a script by placing an invalid key/value on the row.
41+
// If this script managed columns, then this would fail.
42+
row.ImNotManagedInsert = "I'm not managed insert";
4143
}
4244

4345
function afterInsert(row, errors)
@@ -58,6 +60,10 @@ function beforeUpdate(row, oldRow, errors)
5860
throw new Error("beforeUpdate oldRow properties must be case-insensitive.");
5961

6062
stripPrefix(row);
63+
64+
// Test disabling managed columns from a script by placing an invalid key/value on the row.
65+
// If this script managed columns, then this would fail.
66+
row.ImNotManagedUpdate = "I'm not managed update";
6167
}
6268

6369
function afterUpdate(row, oldRow, errors)

0 commit comments

Comments
 (0)