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

20 REPLIES 20

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