MT#5879 Apply newly created id to worm to continue work with cretated template.
MT#5879 Well, now we delete, update and add templates almost in order.