Skip to end of metadata
Go to start of metadata

You want to make sure an already started, already 'Active' Work Order Schedule  entry from being dragged to a different Date and Time in your 
MES Schedule View

Step-by-step guide

Add the following Code to the onSave Script Extension Function of the MES Schedule View component

runtime:



	for i in range(mesObjectList.size()):
			obj = mesObjectList.get(i)
			print obj.getMESObjectType().getName()
			if obj.getMESObjectType().getName() == 'OperationsRequest':
				state = obj.getPropertyValue('ScheduleState')
				print "State is [%s]" % (state)
				if state.endswith('Executed'):
					system.gui.messageBox('Schedule entry cannot be move because it has already started.', 'Information')
					return False;
		
	return True


MES Schedule View