Howdy Guys and Gals,
So I'm working on developing an API solution to make callouts from salesforce to create issues in jira.
I've successfully been able to make test cases by hard-coding the json request body: request.setBody('{"fields": {"project":{"key": "SAL"},"summary": "subject","description": "test","issuetype": {"name": "Bug"}}}');
However, when I try to use a variable, like the body of the case. I get no results. So how do I successfully reference a variable to the json body above?
Thanks! Please no suggestions for addons!
Figured it out. Java doesn't support string interpolation, so you must use this format:
request.setBody('{"fields": {"project":{"key": "SAL"},"summary":" ' + subject + ' ".....
So to use a variable, use " ' + VARIABLENAME + ' "
Thanks me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.