Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Image RemovedImage Added

runtime:



Code Block
	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

...