Attachment error

nameisnani
Mega Sage

Hi All ,

 

While submitting catalog , we have field line manger , ' If line manger not listed we have made line manager approval doucment mandtory ' 

 

as u can see in the below snip 

SunilKumarPadh_0-1675046611817.png

 

it is only 1 document , if we attach more it not going to submit to solve this issue .

 

Please provide me steps .

 

@Sagar Pagar 

@Ankur Bawiskar 

@Gunjan Kiratkar 

@Saurav11 

@Basheer 

 

Thanks in Advance

 

3 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@nameisnani 

you can check if the field is empty in onSubmit catalog client script and check if attachment is present or not

check my blog for the same

Verify Mandatory Attachments Count on Catalog Item 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Basheer
Mega Sage

Hi @nameisnani ,

As far as I understand your situation : If you just attach 1 then it works, if it is more than 1 then it won't allow you.

If this is the case can you share us the code which you've written to validate this.

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

View solution in original post

Sagar Pagar
Tera Patron

Hi @nameisnani,

 

I would suggest to use the Attachment type variable and using Catalog UI policy you can make it mandatory based on conditions.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

View solution in original post

4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, without any details of your script\code the forum cannot review and advise a solution. based on your partial screenshot, your code is not checking to see if there is an attachment added to the record?

Ankur Bawiskar
Tera Patron
Tera Patron

@nameisnani 

you can check if the field is empty in onSubmit catalog client script and check if attachment is present or not

check my blog for the same

Verify Mandatory Attachments Count on Catalog Item 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Basheer
Mega Sage

Hi @nameisnani ,

As far as I understand your situation : If you just attach 1 then it works, if it is more than 1 then it won't allow you.

If this is the case can you share us the code which you've written to validate this.

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

Sagar Pagar
Tera Patron

Hi @nameisnani,

 

I would suggest to use the Attachment type variable and using Catalog UI policy you can make it mandatory based on conditions.

 

Thanks,

Sagar Pagar

The world works with ServiceNow