# Attribute \_\_SYNC\_BACK\_ON on the remote replica when using syncHelper.syncBackAfterProcessing

**URL:** <https://community.exalate.com/t/attribute-sync-back-on-on-the-remote-replica-when-using-synchelper-syncbackafterprocessing/5171>\
**Category:** General Questions\
**Tags:** exalate, servicenow-jira, migrated\_question\
**Created:** [November 4, 2024, 7:47am UTC](https://community.exalate.com/t/attribute-sync-back-on-on-the-remote-replica-when-using-synchelper-syncbackafterprocessing/5171 "2024-11-04T07:47:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:47am UTC](https://community.exalate.com/t/attribute-sync-back-on-on-the-remote-replica-when-using-synchelper-syncbackafterprocessing/5171/1 "2024-11-04T07:47:38Z")

</div>

_Originally asked by Enrique Cadalso on 13 April 2022 [(original question)](https://oldcommunity.exalate.com/questions/42836671)_

* * *

Hello,

We are trying to make sure only some fields are updated when syncHelper.syncBackAfterProcessing() is used. There are some warnings at [https://docs.idalko.com/exalate/display/ED/syncBackAfterProcessing](https://docs.idalko.com/exalate/display/ED/syncBackAfterProcessing) but the provided solutions are far from clear.

There is this undocumented \_\_SYNC\_BACK\_ON attribute on the remote replica when receiving the data from a syncHelper.syncBackAfterProcessing() on the other side. It is not present when the synchronization is caused by an update.

```auto
{
  "version": {
    "major": 1,
    "minor": 14,
    "patch": 0
  },
  "hubIssue": {
    "status_update": "Test F",

    "__SYNC_BACK_ON": 1649857792812,

    "key": "MYTEST-4683",
    "summary": "Test F",
    "comments": [],
    "internalMap": {
      "status_update": "Test F",
      
      
      "__SYNC_BACK_ON": 1649857792812,
      
      
      "eventTriggerContext": {}
    },
  },
  "issueUrl": "https://mytestjira.com/browse/MYTEST-4683"
}

```

We are planning to use it like this

```auto
   if (replica.__SYNC_BACK_ON) {
        //Updates only some fields
        
        entity.u_external_reference_id = replica.key 
		...
        
    } else {

     //Update all fields

   ...

   }

```

Is it safe to use it? Is it going to be deprecated any time soon? Is there any documentation about this attribute?

Thanks.

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:47am UTC](https://community.exalate.com/t/attribute-sync-back-on-on-the-remote-replica-when-using-synchelper-syncbackafterprocessing/5171/2 "2024-11-04T07:47:39Z")

</div>

_Answer by Serhiy Onyshchenko on 22 April 2022_

Hello, Enrique Cadalso , at the moment, there are no plans on deprecating it.  
I’d actually suggest to use syncRequest.remoteSyncEventNumber == 1 (on connections that have syncBack configured) instead (even though it’s not directly saying, that sync is caused by sync back), it’s consistently same on all the platforms.

Regards, Serhiy.

* * *

#### Comments:

> **Enrique Cadalso commented on 22 April 2022**
>
> > Hi Serhiy,
> 
> Thanks for the suggestion. I will use syncRequest.remoteSyncEventNumber == 1 instead.
> 
> One caveat of that option is that, for troubleshooting purposes, we can inspect the replica and see the replica.\_\_SYNC\_BACK\_ON attribute on the “remote replica” using the “Entity Sync status” option on Exalate, but I we won’t be able to see the value of syncRequest.remoteSyncEventNumber had on the last replica.
> 
> Thanks again,
> 
> Enrique
