We receive the information from Jira but the case is not updated

Hi,

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))

}

}

But the field is not updated in Salesforce

This is the outgoing from Jira:

replica.ticketurl = “https://pluxee.atlassian.net/browse/” + issue.key

Can you check why the field is not updated?

Thanks!

Juan

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:

  1. 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.

  2. 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.

  1. Outgoing Sync
    Your outgoing sync from Jira looks correct:
replica.ticketurl = "https://pluxee.atlassian.net/browse/" + issue.key

Just ensure that issue.key is always populated.

  1. 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.

  1. Case EntityType
    Your entityType assignment is fine, but make sure the sync is actually running for Case objects.

  2. 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.

For more details, you can refer to the documentation on mapping Salesforce fields in the sync script.

Try updating your incoming sync script to assign the field directly, and double-check field permissions. That should resolve the issue!

Hi @juan.adrada,

Aida answer’s above seems to be the correct aproach. The value should be assigned directly without using .value

entity.Ticket_Jira__c = replica.ticketurl

Please try Aida’s suggestion and let us know the results. Thanks!

Thanks, unfortunately we tried several ways and it doesn’t update the field.

Checking the points:

  1. Yes, the mapping and the field permissions are well set

  2. we tried with that as well, no changes in the field.

  3. ok, it is

  4. debugging: the information comes in the fields but the update is not done.

  5. yes, it is a case

  6. And there are not errors in the sync logs.

As you can see, we have testes many ways without success. I don’t know if there are any other possibilites.

Thanks, for your help!