Question
Wells Fargo
IN
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.
-
Likes (1)
Matheswaran Ravichandran Indera Sarman -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi,
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!
-Kurt
-
Vamsi Krishna Kunchala Chetan Nagtode Naveen Soni Naru Mohan DINESH KR and 63 More
Wells Fargo
IN
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.
PEG
US
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.
Wells Fargo
IN
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?
PEG
US
What version of Pega Platform are you using?
-
Thilini Pramoda Gustavo Bezerra Neto
Pegasystems Inc.
IN
Could you also share the screenshots of your configuration?
Pegasystems Inc.
IN
Hello Shashikala,
Thanks for posting your query in PSC :) I see that you were able to execute the script.
Just sharing one more approach i.e. adding the javascript function in the UserWorkForm and calling the same onclick of the button. Refer the attachment containing screenshots.
Hope it helps others though.
Regards,
Rincy
-
Sandeep Gupta Saumini Tripathi Mahesh Koul
Pegasystems Inc.
IN
just wanted to add below:
I tried the sample on Pega 7.1.6.
Syntel Inc
US
Thanks Rincy, the document you shared was helpful.
Regards,
Ashwini
Areteans
AU
Hi Guys,
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.
Pegasystems Inc.
IN
Hi,
Is this onClick--->Runscript working in IE ? Its working for me in chrome but not in IE. We are on 7.2.1.