Notification need when Change assigned to Project

Prabhu6
Tera Guru

Need to notify the PM through email and his group when the change request is added to the Project under the related list.

 

Dear Experts,

 

Could you please suggest?

 

Thank you

Prabhu

 

 

4 REPLIES 4

nitinsharma2510
Giga Guru

Hi @Prabhu6 ,

 

Create the notification on the Project or Change Request table as per your requirement. The triggering of the notification can be achieved using flow designer.

  • The trigger could be the insertion of the Change Request record.
  • Query the Project record using the trigger Change request record.
  • Use the flow action "Send notification" with the Project record.

 

Thanks

Nitin Sharma

shyamkumar VK
Kilo Patron

@Prabhu6 ,

Identify the relationship between project and change( you should have some change related field on your project table)

 

So your notification should be on project table with condition as change is not empty(select the field from dropdown and select the field which is related to change)

 

Now under whom to send add the approvers details .

 

Regards,

Shyamkumar

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Sumanth16
Kilo Patron

Hi @Prabhu6 ,

 

Email Script with GlideRecord on Problem task should do the job.

 

Basically,

 

Create a Notification script and add the below code to pull the information of related problem tasks with something like below.



var gr=new GlideRecord('problem_task')//replace with relationship table

gr.addQuery('problem', current.sys_id);//quey with change request sysid

gr.query();

while(gr.next()){

template.print("number:" gr.getValue('number'));

template.print("short_description", gr.getvalue('short_description'));

}

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Maddysunil
Kilo Sage

@Prabhu6 

  1. Create a New Business Rule:

    • Click on "New" to create a new Business Rule.
  2. Define the Trigger:

    • Name: Notify PM and Group on CR Addition
    • Table: Project (or the table where Change Requests are added)
    • When to run: After
    • Insert

 

(function executeRule(current, previous /*null when async*/) {
    // Check if any related Change Requests are added to the Project
    var crGr = new GlideRecord('change_request');
    crGr.addQuery('project', current.sys_id); // Assuming 'project' is the reference field linking CR to Project
    crGr.query();
    
    if (crGr.hasNext()) {
        // Retrieve PM and their group
        var projectManager = current.pm_user.toString(); // Assuming 'pm_user' is the reference field for PM
        var projectGroup = current.pm_group.toString(); // Assuming 'pm_group' is the reference field for PM's group
        
        // Send email notification to the PM
        gs.eventQueue('email.send', null, 'Notify PM', projectManager, 'New Change Request Added', 'A new Change Request has been added to the Project.');
        
        // Send email notification to the PM's group
        gs.eventQueue('email.send', null, 'Notify PM Group', projectGroup, 'New Change Request Added', 'A new Change Request has been added to the Project.');
    }
})(current, previous);

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks