CA Service Management

  • 1.  How to make Attach Document field mandatory.

    Posted Oct 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 Oct 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 Oct 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.