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

Knight Rider
Mega Guru

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)

 

KnightRider_0-1730163658817.png

 

UI Action snippet:

KnightRider_0-1730205126857.png

 

 

Please  let me know how do I make the UI actions work same across the workspace view /Platform view .

 

Thanks in Advance!!

1 REPLY 1

Najmuddin Mohd
Mega Sage

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');
    }

}

 

NajmuddinMohd_0-1730182203362.png



NajmuddinMohd_1-1730182240757.png



If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.