?Husband has med. induced ED. ?

My husband has Med induced ED and was told to take Viagra to help. The doctor said that it was safe when TTC but that you have to be careful... What the hell does that even mean?!?!?
He can "get it up", but it takes a lot of coaxing and it goes soft if we don't have sex immediately. (Which means NO foreplay for me?)
Any ladies with this situation or any advice, please!