Time card Notification

Kusuma2
Kilo Guru

Hi All,

I need to trigger a notification on Time card table when Time card is submitted.

This notification should go to the project manager defined on the project record.

Table   :     time_card

When to send :   updated.

filter condition:     state changes to submitted.

Who will receive : Project manager(who is on the related project record).

How can we do this?

Regards,

Ajay

6 REPLIES 6

Chuck Tomasi
Tera Patron

HI Ajay,



It sounds like you have most of this figured out. Creating notifications is pretty easy. Refer to this page for help:




Email Notifications - ServiceNow Wiki


Thanks for your response.


My question here is:


When we create a time card through the Project related list, a notification should be sent to the project manager(which is a reference field on project form).


How can I assign the project manager in the 'who will receive' section in the email notification.



Regards,


Ajay.


You wouldn't be able to do this with the "Who will receive" fields. I've looked through the docs and don't see a way to set the "to" address, but there is a way to "cc" that person via script. See section 4.5 here.



Scripting for Email Notifications - ServiceNow Wiki



Thanks for your reply Chuck. I have achieved this in the following manner.



I created a field (manager) on Time Card form and populated that field from the Project Record using the client script. Later on I referred that field(manager) in the 'who will receive' section of the notification. Also, according to my requirement I made the manager field invisible on the form.



Regards,


Ajay.