Last activity: 16 Oct 2018 12:03 EDT
On Click of Button using Run script
I am trying to configure "Run Script" on click of a button. I have created JS File included the function and added in Harness, included the function in the section on click of button. the section is inside the same harness. but still not able to execute the scrpt on click of button.
can you one please help is there any way to confiure the script. I have given the function name with out "()" and tried as literal and with double quotes too.
No error when clicked on Button, nothing is executing.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
I just recently set up a simple function to be called on click of a button using Run Script. I've attached a couple of screenshots to show how I set mine up, so you can compare them against your configuration.
Hope this helps!
Its working now. The activity did now allow me to execute until I unchecked authentication and checked "Allow to call from service" in security tab Thank you.
I thought I would point out that if you have a UI Action list with multiple actions, then they execute sequentially, with the next one in the list not starting until the previous one completes. However, if the action is to run a script, then "done" is when the script completes. If the script asynchronously runs an activity on the server and then returns, the next step in the action list will likely be executing at the same time as that activity from the previous step is also executing. So the guaranteed synchronization does not quite hold true when running scripts. This can cause problems if you are assuming otherwise.
when activity executed from script, the next action and script activity executes simultaneously? I ran tracer and saw the execution one after the other. is there a chance this might change?
What version of Pega Platform are you using?
Could you also share the screenshots of your configuration?
Thanks for posting your query in PSC :) I see that you were able to execute the script.
Hope it helps others though.
just wanted to add below:
I tried the sample on Pega 7.1.6.
Thanks Rincy, the document you shared was helpful.
This comment/reply has been branched into a new post
Do you guys know how to check which function is being called on click of that button?
Suppose I have 5 function calls, then is there any way to identify how they are getting called at runtime..?
I explored Developer tool to check the script, but I Could not find anything.
Is this onClick--->Runscript working in IE ? Its working for me in chrome but not in IE. We are on 7.2.1.