Clarity Service Management

Expand all | Collapse all

Validation before save

Jump to Best Answer
  • 1.  Validation before save

    Posted 05-04-2019 09:34 PM

    Hi ,

    I want to have some validation checks before save the change order.

    If zischgexist is "NO" and change type is other than standard , validation should not allow the change order to save.

    It should give some error message.

     

    Where should i write this logic?

    Can anyone help me on this?

     

    Thanks,

    Lakshmipriya



  • 2.  Re: Validation before save

    Posted 05-06-2019 12:46 PM

    In your form (htmpl) file, define a function named preSaveTrigger2. Your JavaScript should return True if the conditions are met and False if they are not met.



  • 3.  Re: Validation before save
    Best Answer

    Posted 05-06-2019 01:53 PM

    Hi 

     

    Something similar to what is discussed on the below URL should help:

     

    http://forum.servicedeskusers.com/forums/topic/11536-presave-trigger-help/?tab=comments#comment-35486

     

    See also:

     

    https://communities.ca.com/message/242046661-re-fieldes-rquired-for-change?

     

    This is all in line with what Lindsay_Estabrooks has mentioned.

     

    ===

    Kind Regards,

    Brian



  • 4.  Re: Validation before save

    Posted 05-10-2019 01:26 PM

    I have tried the approach suggested in the below url

    https://communities.ca.com/message/242046661-re-fieldes-rquired-for-change? and it worked

     

    Thanks Brian_Mathato



  • 5.  Re: Validation before save

    Posted 05-06-2019 03:08 PM

    It might not be neccessary yet, but in my oppinion, the only "correct" place to add application logic is at the object layer.
    Only then all interfaces will have the same logic, standard GUI, xFlow , SOAP and REST API and  fragment scripts.
    That means, you need to declare a majic trigger and define/write some spell code.
    You might find many examples in the communities.
    Regards
    .....Michael