You have a Schedule Entry for the future and want to prevent it from being manually started now

Step-by-step guide

Add the following code to the beginOperation Scipt Extension Function of the MES Schedule Selector Component


	for i in range(MESObjectList.size()):
	    obj = MESObjectList.get(i)
	    oName = obj.getMESObjectType().getName()
	    print "Object Name? [%s]" % (oName)
	    if oName == 'OperationsRequest':
	    	originalBegin = obj.getOriginalBeginDateTime()
	    	print "original Begin Date? [%s]" % (originalBegin)
	    	rightNow =
	    	print "Right Now? [%s]" % (rightNow)
	    	if rightNow < originalBegin:
	       		areUsure = "Schedule entry was programmed for [%s] and you are changing it to [%s]" % (originalBegin,rightNow)
	    		if system.gui.confirm(areUsure, 'Caution Changing Schedule Time'):
	    			system.gui.messageBox('Re-Schedule entry.', 'Information')
	    			return True
	    			system.gui.messageBox('NOT Re-Scheduled entry.', 'Information')
	    			return False

	return True

MES Schedule Selector