You need to first get all the available notification objects and set the stateOn for the Beeper object.
else if (type == 1)
// If the Type of the Notification is a Beeper emit a continuous high pitch tone at maximum volume
notification.setBeeperFrequency = 8000;
notification.setBeeperVolume = 3;
// Start the Beeper
notification.stateOn = index;
Is your app running on the SB1 Shell or core Rhoelements?