Get _id of inserted row and store in session

I tried this code and it does not return the _id. Any reason why? I need to get the _id to update the dataset and stay on one line.