PERSIST:
One discussion is not going to permanently wipe out serious suicidal ideas. On the other hand, frequent, regular contact with your friend while they are having such a tough time, will help to protect and keep them safe while the suicidal ideas grow weaker with time. Persevering is very useful, even if it simply takes the form of making sure your friend is not left alone, until the problem has been resolved. Making sure your friend is with someone when suicidal ideas are significant can be very useful, especially when your friend understands they do not have to make conversation or interact in their normal way.
If your friend has an illness which causes them to have thoughts of suicide, do be aware that such illnesses can come back from time-to-time, often with the suicidal ideas coming back much earlier than before. Again, support and persistence will make a big difference.