スポンサーリンク
返答文書作成時に親文書の値を引き継いで表示させることができますのでその方法をご紹介します。
親文書の設定
返答文書作成ボタンのアクション
![f:id:ishimotohiroaki:20160518183538p:plain f:id:ishimotohiroaki:20160518183538p:plain](https://it.hirokun.net/wp-content/uploads/2019/03/20160518183538.png)
カテゴリ:文書
アクション:返答文書の作成
開くページの名前:formResponse(XPageです)
親文書ID:以下で説明
![f:id:ishimotohiroaki:20160518183736p:plain f:id:ishimotohiroaki:20160518183736p:plain](https://it.hirokun.net/wp-content/uploads/2019/03/20160518183736.png)
document1.getDocument().getNoteID() とすることで返答文書に親文書のIDを渡します。
返答文書の設定
まずはデータの設定
![f:id:ishimotohiroaki:20160518184433p:plain f:id:ishimotohiroaki:20160518184433p:plain](https://it.hirokun.net/wp-content/uploads/2019/03/20160518184433.png)
親IDの◆をクリック
![f:id:ishimotohiroaki:20160518184524p:plain f:id:ishimotohiroaki:20160518184524p:plain](https://it.hirokun.net/wp-content/uploads/2019/03/20160518184524.png)
親IDはURLパラメーターにあるparentIDを使います。
親文書の値を返答文書にセットします。
postNewDocumentイベントを利用します。
![f:id:ishimotohiroaki:20160518185202p:plain f:id:ishimotohiroaki:20160518185202p:plain](https://it.hirokun.net/wp-content/uploads/2019/03/20160518185202.png)
式: var parent:NotesDocument = database.getDocumentByID(document1.getParentId()); |
1行目・・・親文書を検索し取得します。
2行目・・・今回は必要ないですが返答文書かどうかチェックできるようにします。
3行目・・・返答文書に親文書のCategoriesフィールドをセットします。
他の方法
セッションに格納して持ちまわる方法もありますが、この方法の場合は再利用するときにしましょう。
佐藤 権一,上ノ山 俊秀,北楯 良子,西塚 麻弥 秀和システム 2013-12-25
スポンサーリンク
スポンサーリンク