Your if would only execute if the record mode is D...
# suitescript
a
Your if would only execute if the record mode is DIFFERENT than create...