alternativeMaterialListDisplayBefore

With this event, the user can intercept whether an alternative material is displayed in the WO list and thus change the default behavior of the system.

 

Supported variables:

 

e_script  -  Variable that contains the script is going to be executed.

 

Example1:

 

Display a message box whose process is not allowed and the process is stopped in order not to display the alternative material list pop-up:

 

windowevent alternativeMaterialListDisplayBefore
  message=We don't allow to change alternative Material
  return failure
end event

 

Example2:

 

Change standard list of available items to be replaced:

 

windowevent alternativeMaterialListDisplayBefore
//We change standard script to display different list of items
setvar=e_script=bpopup=add=bmp\replace.png=(RM003) Raw Material / Normal =1=setvar=ls_new_itemcode=RM003^setvar=ls_new_qty=1,000000^replaceitemcode()
bpopup=add=bmp\replace.png=(RM) Raw Material=1=setvar=ls_new_itemcode=RM^setvar=ls_new_qty=1,000000^replaceitemcode()
bpopup=width=1400
return trueend event