creating duplicate change in bidirectional integration

Anandkumar g
Tera Contributor

When I choose the assignment group during the initial change creation process, it creates two changes one at a time. I have used ebonding change integration 2 servicenow with bidirectional. There would be a change in the integration if hadn't chosen the assignment group at first. Help us solve this problem, please.

 

Business Rule
 
When : After and Insert / Update
 
(function executeRule(current, previous /*null when async*/ ) {
    var asmnt_grp = current.getDisplayValue('assignment_group');
    var chg_type = current.getDisplayValue('type');
    var approvs =  current.getDisplayValue('approval');
  //  gs.addErrorMessage(chg_type);
    //gs.addErrorMessage(approvs);
   var queue = current.getDisplayValue('u_queue');
   
    var ebond;
    var flag = '';

   if (current.comments.changes() && current.work_notes.changes())
        flag = 'comments_notes';
    else if (current.work_notes.changes())
        flag = 'notes';
    else if (current.comments.changes())
        flag = 'comments';
    if (current.operation() == 'insert') {
        //if (current.correlation_display.toString() == '') {          
        ebond = new genericEbondingUtil().initiateEbonding(current.sys_class_name, current, 'insert', current.number.toString(), flag);
    } else {
        ebond = new genericEbondingUtil().initiateEbonding(current.sys_class_name, current, 'update', current.number.toString(), flag);
    }

})(current, previous);
2 REPLIES 2

Anandkumar g
Tera Contributor

Please help me to fix this issue 

 

Please check this updates

 

  • Ebonding Service Account

Field changes•

2025-01-16 03:05:12

    • Correlation displayCHG0039637wasCHG0039636
  • OA

Ebonding Service Account

Field changes•

2025-01-16 03:05:11

    • Correlation displayCHG0039636 Like this 

dhirennotani
Giga Expert

Hi @Anandkumar g ,

 

Hope you are doing well.

 

If you are open to explore dedicated integration solutions for syncing changes and other entities between 2 servicenow instances, I would recommend you to try out a fully decentralized solution Exalate.

 

It provides you an access to it's groovy based scripting interface with ready to go templates and also a lot of documentation for syncing system/custom fields very easily.

 

We do offer a 30 day free trial incase you want to evaluate the product.

 

Thanks, Dhiren