we are sending the URL from Jira to Salesforce and assign the field like this in the incoming sync:
if(firstSync){
entity.entityType = “Case”
}
if(entity.entityType == “Case”){
// Debug: Log the value of ticketurl from the incoming replica
def previousValue = entity.Ticket_Jira__c
entity.Ticket_Jira__c.value = replica.ticketurl
// Add a sync log entry if Ticket_Jira__c is not updated
if(previousValue == entity.Ticket_Jira__c) {
debug.error("Ticket_Jira__c was not updated. Current value: " + String.valueOf(entity.Ticket_Jira__c) + ", Incoming value: " + String.valueOf(replica.ticketurl))
}
It looks like you’re trying to sync the Jira issue URL to a custom Salesforce field (Ticket_Jira__c), but the field isn’t updating as expected. Here are a few things to check based on your setup:
Field Mapping and Permissions
Make sure that the Ticket_Jira__c field exists on the Salesforce Case object and that the Exalate integration user has permission to update it. If the field is read-only or missing, updates won’t go through.
Script Logic
Your script assigns the value like this:
entity.Ticket_Jira__c.value = replica.ticketurl
For Salesforce, you should assign the value directly without the .value property:
entity.Ticket_Jira__c = replica.ticketurl
The .value property is not required for Salesforce fields—using it may prevent the update.
Outgoing Sync
Your outgoing sync from Jira looks correct:
Debugging
If you want to log the previous and new values, you can do:
def previousValue = entity.Ticket_Jira__c
entity.Ticket_Jira__c = replica.ticketurl
if(previousValue == entity.Ticket_Jira__c) {
debug.error("Ticket_Jira__c was not updated. Current value: " + String.valueOf(entity.Ticket_Jira__c) + ", Incoming value: " + String.valueOf(replica.ticketurl))
}
But remember, if the incoming value is the same as the current value, Salesforce won’t register it as an update.
Case EntityType
Your entityType assignment is fine, but make sure the sync is actually running for Case objects.
Check Sync Logs
Review the sync logs in Exalate for any errors related to field updates or permissions. This can provide more details if something is failing silently.