`uvm_do_on


transaction.rand_mode(0); 
`uvm_do_on (transaction, some_sequencer) 

Will the 1st line ensure that randomization does not happen for transaction when the second line is executed?

Thank You!

In reply to new_to_uvm:
A couple of problems with your code:

Turning off rand_mode() means that all class members inside your transaction class will be kept as state variable, but any constraints in the transaction class must still be satisfied. The `uvm_do macros call create_item(), and the rand_mode() of the newly created item will be reset.

We recommend not using the `uvm_do macros and instead call create and start_item separately.