CA Service Management

Expand all | Collapse all

How to make Attach Document field mandatory.

Jump to Best Answer
  • 1.  How to make Attach Document field mandatory.

    Posted 10-10-2017 03:30 AM

    Hello Everyone...
    We are working on creation of new category under specific tenant, for the category we need to make "Attach Document" as mandatory field so how we can make it possible ?



  • 2.  Re: How to make Attach Document field mandatory.
    Best Answer

    Posted 10-10-2017 04:08 AM

    hi,

    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.

    Regards,

    cdtj



  • 3.  Re: How to make Attach Document field mandatory.

    Posted 10-10-2017 04:14 PM

    Hi Mandar,

    Did the info that cctj provided help you on this?  If so, please mark his post as correct.

    Thanks,

    Jon I.