Showing HxGN EAM Error, Question messages - HxGN EAM - 12.1 - Feature Briefs - Hexagon

HxGN EAM Custom Framework

Search by Category
Feature Briefs
HxGN EAM Version

Sample code



messageName: 'showMessage',

message: 'MSG_ERR_WSJOBS_DEPTSEC', // You can provide your own message string here if you want or use HxGN EAM error messages.

messageType: 'question', // valid values are 'question', 'error', 'warning', and 'confirmation’.

questionMessageButtons: 'YESNO' // If you are not showing a question message this property can be excluded from the message. Valid values are 'YESNO', 'YESNOCANCEL', 'YESCANCEL'. If you are showing a question message and do not provide 'buttons' property, we'll default to 'YESNO'.


Question Message Callback example message (to be handled by the custom application)


messageName: 'questionMessageCallback',

answer: 'yes' // Value will be 'yes', 'no', or 'cancel’.


  • If we Click on Save button, then It’ll call doSave function.

  • In the usage of above scenario, when we click on Save button on toolbar, first it will call postMessageListener function in customframework_common.js and then call questionmessagecallback event.

  • postMessageListenerfunction in customframework_common.js

  • This questionmessagecallback event written in the user_accounts.js file in window. onload & window.onunload functions.

  • While opening the screen Window.onload function in the user_accounts.js will be called.

  • It’ll redirect to questionmessagecallback event in the user_accounts.js

  • If we Click on Save button, then it’ll call doSave function.

  • While leaving the screen window.onunload function in the user_accounts.js will be called.