User event context can be used to control whether the message is shown on records in view, create, or edit mode.

The following code sample shows the syntax for this member.
//Add additional code
…
// Options object as parameter
form.addPageInitMessage({type: message.Type.INFORMATION, message: ‘Hello world!’, duration: 5000});
// Message object as parameter
var messageObj = message.create({type: message.Type.INFORMATION, message: ‘Hello world!’, duration: 5000}); form.addPageInitMessage({message: messageObj});
// Show message when the record is in view mode
function beforeLoad(context) {
if(context.type === ‘view’)
context.form.addPageInitMessage(messageOptions);
}
…
//Add additional code