You can do this natively in the latest releases (say 2023 R1), so no need for any antype apdl commands.
Use the coupled field transient system (using thermal and electric conduction physics region settings - see below).
Since it is transient have a small enough time step and define the initial temp. conditions as needed (initial conditions).
All the best