Creating a Custom Table and configure an email Notification to trigger to an Assignment Group

Fredy Voke
Tera Contributor

is it possible to create a custom table and configure an email notification to trigger to assignment group once any request is been submitted from the custom table, the client does not want any RITM or Task to this custom table.

 

I need to configure email notification field to automatically populate the email address of the Requested For user to this request, I created the custom table and also created a record producer with the same field names but still trying to figure out how to configure the requested for and email field.

 

Thanks

2 ACCEPTED SOLUTIONS

nayanmule
Tera Guru

Hi @Fredy Voke ,

 

Yes, you can definitely achieve this. If you have already created a custom table and mapped it to a record producer then here's a simple way to achieve the notification.

 

Create a Standalone notification- 

1. Go to the System Notications table and create a new notification.

2. Once you click on create new notification , select the custom table that you have created and add the trigger condition like on insert , active is true something ..

3. In the 'Who will receive' tab click on the Users/Groups in the fields andd select the requested for .

 

 

4. In "What it will contain" , add the subject and body of your wish . You can also add the fields from the table in the body of your email.

Click Submit and test your notification in the email logs.

 

If my response was helpful to you , please mark it as helpful and accept the solution.

 

Regards,

Nayan

 

View solution in original post

Hi @Fredy Voke 

 

For requested-For you can use this step:

 

Mohammed8_0-1765784513584.png

 

Go to dictionary in default value:

 

Mohammed8_1-1765784622294.png

 

Regards,

Mohammed Zakir

View solution in original post

23 REPLIES 23

Hi @Fredy Voke 

Thanks for pointing it out

You can use use client script on-load to get user and its email id, check your variable backend and makes change accordingly

 

function onLoad() {

// get logged-in user
var userId = g_user.userID;

// populate Requested For if empty
if (!g_form.getValue('requested_for')) {
g_form.setValue('requested_for', userId);
}

// populate NMCI Email
if (!g_form.getValue('u_nmci_email')) {
g_form.getReference('requested_for', function(user) {
if (user) {
g_form.setValue('u_nmci_email', user.email);
}
});
}
}

 

This is script if your field requested_for is changed (on_change)

 

function onChange(control, oldValue, newValue, isLoading) {

if (isLoading || !newValue) {
g_form.setValue('u_nmci_email', '');
return;
}

g_form.getReference('requested_for', function(user) {
if (user) {
g_form.setValue('u_nmci_email', user.email);
}
});
}

  

This will form work fine on client side, if you want more control you can go business rule

 

Regrads,

Mohammed Zakir

Thanks Mohammed8, sorry I was away from my desk for other task. I will apply your suggestions and let you know afterwards. I appreciate your help.

@Fredy Voke  , We don't have the field type as User on the table or forms like we have in the catalog items. So, we need to use the reference type field only . 

If you can share the screenshot of the field dictionary and the default value where you are setting the field, we can understand more.

 

Regards,

Nayan

Thanks Nayan, sorry I was away from my desk for other task. I will take a screenshot shortly and send it to you. I appreciate your help.

Here it is;

FredyVoke_0-1765805786407.pngFredyVoke_1-1765805812595.png

 

 

Please let me know this is exact what you are referring to, thanks