CA Service Management

 View Only
  • 1.  End User Attachment Validation

    Posted Nov 28, 2017 11:43 AM

    Hello;

     

    i have a concern from the customer that asking for a specific case if its doable or not:

     

    In The End User Interface can we make a validation to check if the employee has attached at least one document or not.

     

    what the customer is trying to achieve is to force the end user to attach at least one document before saving the request?!!

     

    Any Thoughts on that?!!

     

    Best Regards;

     

    Mohamed El-Fahd



  • 2.  Re: End User Attachment Validation

    Broadcom Employee
    Posted Nov 28, 2017 12:12 PM


  • 3.  Re: End User Attachment Validation

    Posted Nov 28, 2017 12:24 PM

    Thnx Chi For your feedback; but i have 3 concerns regarding the following code:

     

    1- zAttmntcount: is it a customized attribute that i should create first before?

    2- regarding the Javascript i will open WSP Then Employee form and i will choose java script the past the below script?

    3- how shall i combine this method with spel post validation?

     

    Appreciate your patience and kind response

     

     

    you may use preSaveTrigger() for these purposes. Depending on role and sdm version attachments displaying may vary, you need get attachments count using JavaScript simply checking DOM tree for attachments inputs. Code could be:

    function preSaveTrigger() {
         // get attachments count using DOM model
         if (zAttmntCount > 0)
              return true;
         else
              return false;
    }

    Also you can combine this method with spel post validation.



  • 4.  Re: End User Attachment Validation

    Posted Nov 28, 2017 05:04 PM

    Hello Chi;

     

    I tried your suggestion as follow:

     

    then after i attach any file i received the above message

     

    Kindly Advice