Skip to main content
Solved

Streams message for group of users

  • October 9, 2023
  • 8 replies
  • 342 views

Forum|alt.badge.img+2

hello; 

 

is there a way to send notifcation to group of users (i dont mean multiple users i mean the object user group ) and not for only one user;

 

thank you in advance for ur help

Best answer by Link

Hi @mohamed_akrouh 

if you make your own sql code it should be possible but not in standard.

8 replies

Link
Superhero (Customer)
Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1265 replies
  • Answer
  • October 9, 2023

Hi @mohamed_akrouh 

if you make your own sql code it should be possible but not in standard.


Forum|alt.badge.img+2
  • Author
  • Sidekick
  • 7 replies
  • October 10, 2023

hello,

thank you for you answer 

but what is the function i can use in my sql to do that? 

 

thank you again


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 326 replies
  • October 10, 2023

hello,

thank you for you answer 

but what is the function i can use in my sql to do that? 

 

thank you again

@mohamed_akrouh Hi,

You use the code below.

DECLARE
attr_ VARCHAR2(2000);
info_ VARCHAR2(2000);
objid_ VARCHAR2(20);
objversion_ VARCHAR2(100);

CURSOR openoracleusers IS
SELECT username FROM ifsapp.oracle_account t WHERE account_status = 'OPEN' AND t.username in ('HASANYUCEL','USER1','USER2');

BEGIN
FOR rec_ IN openoracleusers
LOOP
ifsapp.client_sys.clear_attr(attr_);
ifsapp.client_sys.add_to_attr('FROM_USER', 'IFSAPP', attr_);
ifsapp.client_sys.add_to_attr('TO_USER', rec_.username, attr_);
ifsapp.client_sys.add_to_attr('HEADER', 'TEST', attr_);
ifsapp.client_sys.add_to_attr('MESSAGE', 'Whats up man!', attr_);
ifsapp.client_sys.add_to_attr('STREAM_TYPE_DB', 'GENERAL', attr_);
ifsapp.client_sys.add_to_attr('VISIBLE', ifsapp.fnd_boolean_api.decode('TRUE'), attr_);
ifsapp.client_sys.add_to_attr('READ', ifsapp.fnd_boolean_api.decode('FALSE'), attr_);
ifsapp.fnd_stream_api.new__(info_, objid_, objversion_, attr_, 'DO');
--COMMIT;
END LOOP;
END;


 

 


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 326 replies
  • October 10, 2023

For a group, you can use User Groups. Just find the usernames of group members in a User Group.


Link
Superhero (Customer)
Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1265 replies
  • October 10, 2023

It is a good sql code @hhy38 and it should work.

Thank you for sharing. 👍🏼


Forum|alt.badge.img+2
  • Author
  • Sidekick
  • 7 replies
  • October 10, 2023

thank you so much @Link  and @hhy38  i  will test this and i will let you know 


Forum|alt.badge.img+2
  • Author
  • Sidekick
  • 7 replies
  • October 12, 2023

hello,

thank you for you answer 

but what is the function i can use in my sql to do that? 

 

thank you again

@mohamed_akrouh Hi,

You use the code below.

DECLARE
attr_ VARCHAR2(2000);
info_ VARCHAR2(2000);
objid_ VARCHAR2(20);
objversion_ VARCHAR2(100);

CURSOR openoracleusers IS
SELECT username FROM ifsapp.oracle_account t WHERE account_status = 'OPEN' AND t.username in ('HASANYUCEL','USER1','USER2');

BEGIN
FOR rec_ IN openoracleusers
LOOP
ifsapp.client_sys.clear_attr(attr_);
ifsapp.client_sys.add_to_attr('FROM_USER', 'IFSAPP', attr_);
ifsapp.client_sys.add_to_attr('TO_USER', rec_.username, attr_);
ifsapp.client_sys.add_to_attr('HEADER', 'TEST', attr_);
ifsapp.client_sys.add_to_attr('MESSAGE', 'Whats up man!', attr_);
ifsapp.client_sys.add_to_attr('STREAM_TYPE_DB', 'GENERAL', attr_);
ifsapp.client_sys.add_to_attr('VISIBLE', ifsapp.fnd_boolean_api.decode('TRUE'), attr_);
ifsapp.client_sys.add_to_attr('READ', ifsapp.fnd_boolean_api.decode('FALSE'), attr_);
ifsapp.fnd_stream_api.new__(info_, objid_, objversion_, attr_, 'DO');
--COMMIT;
END LOOP;
END;


 

 

it works :D merci beaucoup


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 326 replies
  • October 12, 2023

@mohamed_akrouh You are welcome :)