Script to set reference field to empty
I have a script that attempts to set link a child record to a parent table based on an expression. If the child record doesn't meet the crieteria, it sets the link to "empty". Similar to:
if childRecordName = "Test" then
refParentRecord := 1
refParentRecord := null
But the script gives an error stating, "Expression must return a number or record id: null at line ... etc."
How can I set a reference field to Null within a script's If / Else statement?