This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user is pulling the relationship data in their CRED hook but its not pulling the current set relationship but the previous one.
Everything should be made in the front end (not in the back end) and when I'm trying to use it, the title is not changed after the first submission.
Here is exactly what I am doing :
1. Go to the page page backoffice/gestion-des-stages/ => you should have a Views with the list of the "stages"
2. Click on Modif in the right of the first line. Look at the the current title before. This title includes the name of the stage location. It can have 2 different values :Vaulx en Velin – Salle 1 or Saint Quentin Fallavier
3. When you are in the modification page, change the "Lieu du stage" and use not the one that is currently in the title and submit. .
4. Normally, after submission, the title should be upgraded with the name of the location you have chosen (you have the title in the Views (left column) of the backoffice/gestion-stage page where you are redirected after Cred submission). For me, the title is not changed after the first submission !
This way we ensure that all the data is saved to the database. It could be that the relationship data is being saved later and we are retrieving it a little too early.
It seems that the database record of the relationship took more time than planned and the function you proposed was closing the issue.
Perhaps would it be good to add some info in the documentation page in order to explain what could be the cases that needs to use it instead of the standard red_save_data !