We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Event Field mapping script

Soni Rahul
Tera Contributor

Hi All,

I have a one requirement to add the assignment group of alerts based on some conditions through the event field mapping script, right now for testing purpose I am just hardcoding the assignment group in script but it's not working so can you please help me how I can update the assignment group of alerts through event field mapping script.


Script 

(function eventFieldMappingScript(eventGr, origEventSysId, ciSysId, fieldMappingRuleName) {
    try {
     eventGr.setValue('assignment_group', '287ee6fea9fe198100ada7950d0b1b73');
     return true;
  } catch (e) {
     gs.error(" The script type mapping rule '" + fieldMappingRuleName + "' ran with the error: \n" + e);
  }

 })(eventGr, origEventSysId, ciSysId, fieldMappingRuleName);

Thanks

6 REPLIES 6

Hi Vishal,

I think this will not work, as alert will only create after this execution is done, I have tested this as well and the alertNum returns me as null, please correct me if I am wrong.😉

Thanks.
 

Hi @Soni Rahul ,

 

I’m trying to update the Assignment Group using event field mapping. Have you already fixed this issue?

If yes, could you please share the steps you followed to resolve it?

 

Thanks