内部ノートの送信
これは、タイプが内部ノートの新しいSRメッセージが作成されたときに受信者に送信される通知をトリガーするサンプル・コードです。
このサンプル・コードは、「アプリケーション・コンポーザ」>「オブジェクト」>「標準オブジェクト」>「サービス・リクエスト」>「メッセージ」>「サーバー・スクリプト」でコピーして貼り付けることができます。
/* DISCLAIMER: This trigger is provided only as a reference.
* TRIGGER TYPE: Before Insert to Database
* OBJECT: Message (child of Service Request)
* Use Case: Send an internal notification to the user when an SR message is created.
*/
if(MessageTypeCd == 'ORA_SVC_INTERNAL_NOTE')
{
try{
def map = new HashMap();
map.put("Channels",["ORA_SVC_BELL", "ORA_SVC_EMAIL"]);
map.put("MessageText","Internal Note message");
map.put("RecipientPartyId", ServiceRequest?.AssigneeResourceId);
map.put("ObjectCode", 'ServiceRequestVO');
map.put("ObjectId", SrId);
adf.util.sendNotification(adf, map);
}
catch (e) {
throw new oracle.jbo.ValidationException('Failure: ' +
e.getMessage())
}
}