Still you will need to do the same, with the befor...
# suitescript
a
Still you will need to do the same, with the beforeLoad event you will then write to a custom/hidden field on the form the
context.type
then from your clientScript you read that field, because form clientScript you will not have access to context.type it would be undefined...