I have a script that load record like this
record.load({id : 2345678,type : record.Type.SALES_ORDER, isDynamic : true});
record.load({id : 8987878,type : record.Type.CREDIT_MEMO, isDynamic : true});
record.load({id : 8987878,type : record.Type.CASH_SALE, isDynamic : true});
Instead of having the record.Type, I would like to create a variable
var thetype = SALES_ORDER or CREDIT_MEMO or CASH_SALE
and call the record load like this
record.load({id : 2345678,type : thetype, isDynamic : true});
So far, I was not able to make it work.
Is it possible ? If so, how ?
Thanks