Skip to main content
Solved

Streams message for group of users


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.

View original
Did this topic help you find an answer to your question?

8 replies

Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1169 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

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)
  • 318 replies
  • October 10, 2023
mohamed_akrouh wrote:

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)
  • 318 replies
  • October 10, 2023

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


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

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

Thank you for sharing. 👍🏼


Forum|alt.badge.img+2

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


Forum|alt.badge.img+2
hhy38 wrote:
mohamed_akrouh wrote:

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)
  • 318 replies
  • October 12, 2023

@mohamed_akrouh You are welcome :)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings