Attachment Mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 11:17 PM
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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 11:23 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 12:19 AM
Hi @Basina Akash,
There is a way to make attachments mandatory using the portal settings. Please find the screenshot below for the proposed approach.
Please mark this correct if it helped you in any way.
Thanks and Regards,
K. Sai Charan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 02:03 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 02:42 AM - edited 03-22-2024 02:44 AM
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
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,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang