Skip to main content

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

Hi @mohamed_akrouh 

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


hello,

thank you for you answer 

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

 

thank you again


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;


 

 


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


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

Thank you for sharing. 👍🏼


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


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 😃 merci beaucoup


@mohamed_akrouh You are welcome :)


Reply