I’m not completely sure whether ADO will accept it as a string as is in your case, or whether it may need to be converted to a numeric value, but this is the simplest approach to test first.
If you do not want to use a static value (like 204031), you can also send the parent ID dynamically in the outgoing sync and resolve it in the incoming sync. For example, in the outgoing sync from Salesforce, send the parent entity ID:
replica.parentId = /* parent entity id that you want to sync */
Then in the incoming sync of ADO:
if (replica.parentId) {
def localParent = syncHelper.getLocalIssueKeyFromRemoteId(replica.parentId.toLong())
if (localParent) {
workItem.parentId = localParent.id
}
}
Hello @Javier
Thanks for this. I tried the approach you suggested, but I’m still not able to add the Parent Link to the created item. I followed the same steps you mentioned, but no luck so far—the Parent Link is not getting added. I also tried alternative methods, but I’m still unable to add the Parent Link to the item at all.
also Tried this way as well -
def localParent = syncHelper.getLocalIssueKeyFromRemoteId(replica.ParentId.toLong())