Creating a response document via a button

I have two forms, Organisation and Contact. Contact is a response to Org, and each form has an XPage where the form can be filled in, saved etc. When opening edit_contact.xsp directly and creating a document (not as a response to an org), everything works fine.

On edit_org.xsp, I have a button with 2 events. The first copies some values into sessionScope so I can inherit them into the Contact. The second is a “Create Response Document” event which creates a new response with the parent ID being the current org document, and sends the user to edit_contact.xsp. Pressing the button changes XPage correctly and the field inheritance works fine, but pressing “Submit” on the Contact form doesn’t save anything, and no document is created.

This exact same setup works 100% as desired in another database, I have no idea why it won’t work properly here. Is there an obscure setting somewhere I am missing?

                    <![CDATA[#{javascript:var doc = document1.getDocument();

                    sessionScope.PFirstName = doc.getFirstItem("P_Firstname").getValueString();
                    sessionScope.PSurname = doc.getFirstItem("P_Surname").getValueString();
                    sessionScope.PFamily = doc.getFirstItem("P_Family").getValueString();
                    sessionScope.PDOB = doc.getFirstItem("P_DOB")
                    sessionScope.PAGE = doc.getFirstItem("P_Age").getValueString();}]]



Here is a link that shows what I am trying to do (minus the field inheritance):

Currently the forms and views all work, but the document created with the “Response” form appears not to be a response document – it has no $REF field. This setup works perfectly in a different database – what is going on?

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » Creating a response document via a button

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录