2 件の回答
1. Create Hierarchy type custom setting and assing value if the field with this URL.2. Also assign API key for JIRA in another field, this would be easy for future use3. write webservice class and embed it in custom buttin on the object To make things easier, we now need to create a button such that whenever it is clicked, the case should be created in JIRA. In developer language, what that means is an apex class is called when the button is clicked. Since we are relying on an external API, we write a web service class to call an apex class and perform the action in Salesforce. In this case, the web service class is written to call the JIRA service.- create button in Case - Upon clicking it, the below screen is what you get. As you can see, there is JSON Declaration that calls the web service apex class.
c. place this button in case page layout{!REQUIRESCRIPT( "/soap/ajax/35.0/connection.js" )}
{!REQUIRESCRIPT( "/soap/ajax/35.0/apex.js" )}
var cs = new sforce.SObject("Case");
cs.Name = '{!Case.Name}'
result = sforce.connection.create('cs');
if (result[0].success == true){
var obj = { "caseId" :"{!cs.Id}", "CaseDesc" :"{!cs.Description}", };
sforce.apex.execute( "callJIRA", "crateCaseMethod", obj );
location.reload();
}