How to Send parameter to Notification without hard coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 03:01 AM
Here My requirement is based on variable values it should trigger a event and send the recipient
Written Business rule on RITM and sending parm1 and parm2
This is here its hard code , can anyone please help me with this without hard code how we can achieve
code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 03:20 AM
Hi @Deva3
What hardcoded value you want to remove from the above code?
If the value of subapp that is Global, Safety and Portal then you can create a system property and use the system property here in the above code like:
Please hit helpful if this resolves your query
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 03:56 AM
I want to Remove user emails as it is hard coded , So any alternate way please let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 06:02 AM
Hi @Deva3
So do you have any field present on the form level or how you're picking the recipient email ID?
However, if the user is predefined then you can add the email id in the system property and use it.
Syte m property>value>abc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 06:41 AM
Hello @Deva3 ,
If the email id is dependent on some user field on record or the user who initiated the session. then you can use below methods.
//this will give you mail address of current user who initiated the session.
var gr = gs.getUser();
gs.info(gr.email);
// this will give email address from user field of record.
current.field_name.email
If the email address is not depedent of any field or user who intiated or any other relation and it is a indepedent value, Then you can create system properties as follow:
1. Navigate to sys_properties.LIST
2. Create New, and add email address in value field as follow and save the reocord.
3. In your business rule, use below method to call the property and get the email address.
Recipient = gs.getProperty('email_address') // use your property Name
Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.
Regards,
Siddhesh