Unable to call action from UI action Workspace client script for Project workspace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 06:07 PM - edited 10-29-2024 05:32 AM
We have introduced a new UI action called "Planning" which will move the Project record phase from "Initiating" to "Planning".
Within the UI action Workspace client script, added the below script to execute.. here within the alert, the action name is printed as "Plan" (i.e., UI action name - highlighted in snippet# 2)
UI Action snippet:
Please let me know how do I make the UI actions work same across the workspace view /Platform view .
Thanks in Advance!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 11:11 PM
Hello @Knight Rider ,
Can you try the below script with the following,
Name: Planning
Action name: planning
Onclick: plan();
Script:
function plan() {
var ans = confirm('Are you sure to move to Planning phase ?');
if (ans) {
gsftSubmit(null, g_form.getFormElement(), 'planning');
}
}
if (typeof window == 'undefined') {
movePhase();
}
function movePhase() {
current.phase = 'planning';
current.update();
}
action.setRedirectURL(current);
Workspace client script:
function onClick(g_form) {
var ans = confirm('Are you sure to move to Planning phase ?');
if (ans) {
g_form.submit('planning');
}
}
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.