Originally asked by Enrique Cadalso on 13 April 2022 (original question)
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 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.
{
"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
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.