Forcing Site and Organization entry in Job Plans app before save.
RobertoG.Palma 270000BQR0 Visits (7159)
In Job Plans app, when you create a new job plan, the org id and site id will become greyed out (ready only) if you attached an attached document first before you fill
How to fix it so the org id and site id will not be ready only when you attach a document before saving record?
Steps to replicate :
The fields will be read-only, just like if you had saved the record.
It seems that the Attach Document action fires a save event on the record and this is why the fields become read-only.
This behavior is not a bug in Maximo and is working as designed. The record is saved before any of the Attachments dialogs can launch.
But there is some workaround that you can try, based on a condition. You have to be sure about this : Do you have or would you ever have any system-level (null siteid and null orgid) or organization-level (null siteid, non-null orgid) job plans?
If all of your job plans are site-level and can only be site-level, you can apply a workaround. However, the
The following autoscript will force entry of orgid and siteid on a new job plan before the record can be saved directly or by clicking on any of the Attachments or other dialogs that might force a save before loading.
Make sure after creating the script that the 'Active' checkbox is checked on the Launch Points tab in the Launch Points table window. This is different than the 'Active' checkbox on the Automation Script tab.
Also, the server does not have to be restarted after creating the script. Once the script is saved and active, the error should be thrown whenever an attempt is made to save a job plan with a null siteid or orgid.
The Souce Code is pasted below the "Create Script with Object Launch Point "
#Source Code: Begin