Attachment Mandatory

Basina Akash
Tera Contributor

I need to make attachment mandatory in catalog item before submitting ,In platform view that too it should only  takes only docx and xlsx extension files only .

4 REPLIES 4

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hi @Basina Akash 

one possible approach would be using before business rule on sys_attachment table to check the file type and aborting and throwing error for types not allowed.

 

Kind Regards,

Ravi Chandra

Sai_Charan_K
Kilo Sage

Hi @Basina Akash,
There is a way to make attachments mandatory using the portal settings. Please find the screenshot below for the proposed approach.

Charan27_0-1711091670031.png

 

Please mark this correct if it helped you in any way.

Thanks and Regards,

K. Sai Charan

And it only should take file types of docx and xlsx type files only i have acheived it in platform view but not in service portal how can we achieve that

swathisarang98
Giga Sage
Giga Sage

Hi @Basina Akash ,

 

If you are using Field type attachment then you can try the below attribute,

 

For making mandatory just make it mandate while creating

swathisarang98_0-1711100484079.png

 

You can make use of variable attributes

allowed_extensions Specifies a list of allowed file types. For example, allowed_extensions=txt;pdf.

Applicable variables: Attachment

max_file_size Specifies the maximum file size in MB. For example max_file_size=2.

Applicable variables: Attachment

 

Hide the OOTB attachment in portal setting,

swathisarang98_1-1711100650827.png

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang