In AJAX document view, save document before adding affiliated project.