How to associate a Salesforce record to a jira issue, from jira, by using the Record ID

Currently, the connector uses the SOQL to search for Salesforce records, which only queries on fields whose data type is text, phone, and email. Since the record ID is an ID-type field (lookup field), the connector cannot find any records when you try to associate them.

This article will help you use the record ID to search and associate Salesforce records with Jira issues.

 Instructions

To make the record ID searchable on the Jira association’s screen:

Create a Salesforce custom text field.

  1. In Salesforce, go to Setup > Object Manager > Select the SObject you want to apply the workaround > Fields & Relationships > Click on New and create a custom text field that will hold the Salesforce Record ID; its length should be 18 or more to match the length of the record ID. Please do not create a formula field to capture the ID.

  2. Click Next and select the visibility of the Field as needed.

  3. Click Next to add the new text field to the object page layout

  4. Click Save, and you'll have the new custom field added to your SObject.

On this field, we need to copy and paste the record ID from the URL (This can be automatized by using a flow or trigger)

Automate the copy of the ID

We can use the following flow to automate the copy:

  1. In Salesforce, go to Setup > Flows > New Flow > Select “Record-Triggered Flow” > Click on Create.

  2. On the next screen, set the flow parameters as follows (in the example we are using the Case object):

  3. Click the add element button (+) and select the “Update Records” option.

  4. On this screen, set the flow parameters as follows:

  5. When we have filled in the field with the record ID, the connector will be able to find it in the jira association screen.