Question
5
Replies
131
Views
Posted: July 21, 2020
Last activity: July 24, 2020
Solved
Ajax call activity and get back reponse
I want to execute an activity via ajax call and get the response from the activity.
***Edited by Moderator: Pallavi to change content type from Discussion to Question***
Hi DucN,
Please follow the below way.
SafeURL() - Is a Hashtable/Map , for holding to activity and Parameters.
put() - for Inserting the Key and value pairs.
toURL() method is for calling the Ajax request.
Make Sure for the Activity you are calling, In security tab - Allow direct invocation from the client or a service is checked.
var strWorkURL = new SafeURL(); strWorkURL.put("pyActivity", "HSBCSI-RAPID-Work.GetWorkByID"); strWorkURL.put("ID",escapeStrId); strWorkURL.put("CaseType",caseType); strWorkURL.put("CaseFind",true); strWorkURL.put("HarnessPurpose","Review"); var strOut1 = httpRequestAsynch(strWorkURL.toURL());