Infos and warning messages won't work on your WHMS app, if you haven't done this
Subhad365
7
User Group Leader
if (counter > maxNumberOfAttempts)
{
warning ("You have exceeded maximum number of attempts");
}
The underlying code will simply ignore it. This is because the WHMS supporting classes don't understand any info, warning or error message, unless if you have made it a part of ProcessGuideMessageData and ProcessGuideNavigationParameters classes. For example, going with the above example, we want our mobile app to throw a warning message whenever the qty given in a given for an item is more than some value. Then you need to wire up the code like this:
if (counter > maxQty)
{
ProcessGuideMessageData messageData = ProcessGuideMessageData::construct();
ProcessGuideMessageData messageData = ProcessGuideMessageData::construct();
messageData.message = "You have exceeded the number of allowed attempts.";
messageData.level = WHSRFColorText::Warning;
navigationParametersFrom = ProcessGuideNavigationParameters::construct();
navigationParametersFrom.messageData = messageData;
}
This you need to write in the doExecute() or validateControl() method of the Process Guided Prompt class.
When you have done this, the warning gracefully show up like this:
Yeah, that's how it works -- you have to emboss the warning message in the process guide class, that's the trick😅
*This post is locked for comments