The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
1
0
-1
2 answers
- 210
Hi Dave,
In the outgoing Salesforce to Jira script, we're using:
def queryUser = httpClient.get("/services/data/v54.0/query/?q=SELECT+Name+FROM+User+WHERE+Id=%27${entity.OwnerId}%27")
This instruction does a query through the Salesforce API to get detail of a record (User object) based on an Id (here the OwnerId of the Case being synchronized with Jira).
From that example you may adapt to get details of the Contact.
Regards,
Stéphane
Add your comment... - 10-1
Yep great - thats actually what we did:
String player_id = entity.ContactId String playerName = "Player Not Found" try { playerName = httpClient.get("/services/data/v54.0/query/?q=SELECT+Name+from+Contact+where+id=%27${player_id}%27").records[0].Name } catch(Exception e1) { //fail silently }
Appreciate the reply - glad we've gone about it the right way!
Cheers!
Add your comment...
Hiya - so when we grab the Case.ContactId it returns the Contact ID key (eg. 003Aq000007PctQIAS) - not the name. Are we able to use this key to lookup the contacts name in the salesforce object ContactCleanInfo.name using ContactCleanInfo.ContactId = "003Aq000007PctQIAS" and then send this back to Jira in the Salesforce Outgoing script?