JavaScript API - SetThread on Incident
Summary
Executing save function in javascript after initializing threadContent
Hi All,
I am trying to update a thread by calling an external API and I want to execute it when the users click on save . The save is happening before my thread is getting updated. The function which I am putting the code is onbeforesave()
Thanks,
Shankar
Version
19bCode Snippet
function onbeforesave(){ $.ajax(settings).success(function (response) { storedResponse =JSON.parse(response); var modifiedText= storedResponse["description"] ; modifiedText = modifiedText.replace(/& lt; /g, "<").replace(/& gt;/g, ">"); window.external.Incident.SetThread(2,translatedThread.text()); }) }
Tagged:
0