Search This Blog

Thursday, June 15, 2023

PLSQL script to send Notification without having Custom Workflow

 DECLARE

v_notification_id        NUMBER     := NULL;

v_from_user_name    VARCHAR2 (500)    := 'AFZAL BAIG'; -----From user 

l_to_user_name         VARCHAR2 (500)    := 'AFZAL BAIG';  ------To user 

v_subject_line           VARCHAR2 (500)    := 'Subject Line'; ---  notification Subject 

v_message_line         VARCHAR2 (500)    := 'Hi this is Test';----You can send any custom message 

BEGIN

v_notification_id :=

wf_notification.send (UPPER (l_to_user_name),

'CS_MSGS',

'EXPANDED_FYI_MSG'

);

wf_notification.setattrtext (v_notification_id,

'#FROM_ROLE',

v_from_user_name

);

wf_notification.setattrtext (v_notification_id,

'OBJECT_TYPE',

v_subject_line

);

wf_notification.setattrtext (v_notification_id, 'SENDER', v_from_user_name);

wf_notification.setattrtext (v_notification_id,

'MESSAGE_TEXT',

v_message_line

);

wf_notification.denormalize_notification (v_notification_id);

COMMIT;

END;

No comments:

Post a Comment