Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
Working on one of projects in Integrated Planning (IP) I met requirement to warn users before they run any important process.

In one of scenarios users plan any data in application developed by Integrated Planning via Web Application Designer (WAD) interface. This planned data should be approved by principals level.

User clicks button "Send for Approval" designed in WAD, but before sending for approval (by planning sequence execution) I want to be sure that button clicked not accidentally or I want to notice user with any notification before.

This blog demonstrates how to show alert message with YES/NO option before IP planning sequence run.

When a user clicks button "Send for Approval" alert message will appear with text "Do you really want .... ?".

If YES clicked, planning sequence will be processed, otherwise no.

First add SCRIPT_ITEM in WAD to your template and in "Web Item Parameters" tab click on script (marked by red color in figure below).

"

In script editor choose "Create with Wizard" and select "Execute a Planning Sequence (Simple)" command.

"

Complete attaching of planning sequence and click OK.

Generated JavaScript code will appear in script editor window.

Edit this code: just after function definition add next javascript code:

var ok_var=confirm("Are you sure you would like to ...")

if (ok_var){

Here will be all code generated by wizard except function definition

}

Be sure that at the end of function you added closing parentheses.

Goto button group/button properties and select in "Action" SCRIPT_FUNCTION.

Then in "Script Function" select function for planning sequence execution (usually the name generated javascript function for planning sequence execution will be function executeJS_EXEC_PLANNING_SEQUENCE_SIMPLE_R.

"

Press OK and save web template. 

Now, if user clicks this button, alert window will appear. Depending on user choice (YES/NO) planning sequence will be executed or no.

13 Comments