Hey all,
I'm creating a custom validation using JavaScript in DRM 11.1.2.4.302. The script needs to determine the value of a node's property before the move and compare it to its value after the move.
Name: MoveValidation
Class: Script
Level: Move
Activation: Run-Time
Code - This returns a JS error: "DRM 16009 - There was an unexpected null value":
if(move.IsPre) {
return true
}
if(move.IsPost) {
move.Values.myValue = true;
return move.Values.myValue;
}
Code - This code runs without error:
if(move.IsPre) {
move.Values.myValue = true;
return move.Values.myValue;
}
if(move.IsPost) {
return true;
}
Code - This is the code I want but it causes the same error as the first set of code:
if(move.IsPre) {
move.Values.myValue = true;
return move.Values.myValue;
}
if(move.IsPost) {
return move.Values.myValue;
}
It seems there's an issue referencing move.Values during the post-move validation. But the Validations Using Scripts documentation states that move.Values persists across pre and post move calls.
Any help or guidance would be appreciated.