I have been working on some requirement for advance warehouse mobile application in AX. The requirement was to do something when item is scanned. So in order to perform this I have registeroverridemethod of leave when item text box is build. The build methods is below:
//This method is updated in WhsWorkExecuteForm
protected void createTextBox(
container _textBox,
boolean _password = false)
{
FormBuildStringControl stringControl;
stringControl = controlGroup.addControl(FormControlType::String,this.elementName(_textBox));
if (this.elementHasError(_textBox))
{
stringControl.colorScheme(FormColorScheme::RGB);
stringControl.backgroundColor(WHSWorkExecuteForm::errorBackgroundColor());
}
stringControl.text(this.elementData(_textBox));
stringControl.label(this.elementLabel(_textBox));
stringControl.passwordStyle(_password);
stringControl.enabled(this.elementEnabled(_textBox));
//Below code is added to register override method
if(this.elementName(_textBox) == #ItemId)
{
stringControl.registerOverrideMethod(methodStr(FormStringControl,Leave),methodStr(WHSWorkExecuteForm,DynamicButtonControl_modified),this);
}
}
This method is being called when I run the warehouse app from AX AOT i.e. Action Menu item -> WHSWorkExecute but it is not working from browser. I have run the incremental CIL as well but no change. Any idea? do I need to do changes in DisplayIEOS.aspx as well?