need code in business rule for a popup which shows yes & No

Thummala_Murthy
Kilo Contributor

HI ,
need code in business rule for a popup which shows yes & No .
i need to perform different actions for yes and no.
when i tried to use alert or gs.addInfoMessage, it is not showing me yes & no in the popup.
can u help me pls.

Tx
Murthy

4 REPLIES 4

MKhan1
Giga Contributor

you can use alert() or confirm() messages in clientscripts and not in business rules. Business rules run server side, hence they don't support client script functions.


HI MK,
Thx for the info.
but teh alert or confirm pops up with only Ok , i need yes or no buttons in the popup and yes has a different func and No has a different func.
how can i handle this.

TX Murthy


You should be able to use confirm() if displaying Yes/No is not required. confirm() has 'OK' and 'Cancel', and returns true or false depending on whether the user clicked on OK or Cancel respectively.

if (confirm('Are you sure you want to quit?')) {
...
} else {
...
}


MKhan1
Giga Contributor

You can create a UI page that has 2 buttons - Yes and No and use GLIDEDIALOGFORM to invoke the UI page. But this will unecessarily complicate the solution. i would suggest that you better convince your users to go with ok and cancel button assuming them to be Yes or No.