Maximo Open Forum

 View Only
  • 1.  Automation Script method to prevent TARGSTARTDATE validation

    Posted 06-24-2021 16:47
    One of the options I always thought that should be built into Maximo is when a user change/updates TARGSTARTDATE on a Work Order the TARGCOMPDATE field should automatically update as well. 

    I've now had enough of my users make this request that I've started to work on an automation script to do this. However I'm running into the business rule that validates that TARGSTARTDATE is <= to TARGCOMPDATE. So if a user wants to set the TARGSTARTDATE to a future date, the validation is kicking in on save before the the automation script can fire off. If I can update the TARGCOMPDATE before the save kicks in, then the new TARGCOMPDATE should meet the validation requirement?

    Is there a method to disable a validation check with an automation script?

    OR

    Is there a method to update the TARGCOMPDATE before the validation check occurs?


    #Administration
    #Customizations

    ------------------------------
    Jason Verly
    Agropur
    ------------------------------


  • 2.  RE: Automation Script method to prevent TARGSTARTDATE validation

    Posted 06-25-2021 08:56
    Good request but I don't think it's possible with an automation script on the out of the box field. I think you'd have to extend the Java class and implement your logic there as the validate on the java class fires before a validate automation script would.

    While "hacky", you could add a custom attribute that you display on screen and use an automation script on that to update the targcompdate and then set the value provided by the user in the targstartdate field. From the user perspective, they probably wouldn't notice and would allow you to implement your logic without needing to write java.

    ------------------------------
    Steven Shull
    Projetech Inc.
    ------------------------------



  • 3.  RE: Automation Script method to prevent TARGSTARTDATE validation

    Posted 06-25-2021 09:25
    Thanks Steve. I did some more research last night and thought this was the answer I was going to find this morning.

    Back up plan now is to assess our use of TARGCOMPDATE and then possibly null out the value as a standard. It's hacky, but may actually be the right step based on how I think we're not using TARGCOMPDATE.

    ------------------------------
    Jason Verly
    Agropur
    ------------------------------



  • 4.  RE: Automation Script method to prevent TARGSTARTDATE validation

    Posted 06-25-2021 12:52
    >>> the validation is kicking in on save before the the automation script can fire off

    Is your script using an Attribute Launch Point on the Validate option?


    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------



  • 5.  RE: Automation Script method to prevent TARGSTARTDATE validation

    Posted 06-30-2021 10:58
    Hi Travis,

    No, the initial script was to set on Save with an Object Launch Point to update the FNLCONSTRAINT date field to match the grace period standard in SMRP 5.4.10 spec. As we worked through that update we found the validation error on changes with the TARGCOMPDATE and wanted to expand the scope to include updating both fields based on the new date value in TARGSTARTDATE.


    Jason

    ------------------------------
    Jason Verly
    Agropur
    ------------------------------