Is it possible to check if any file has been added...
# suitescript
e
Is it possible to check if any file has been added when creating a new record? I need to make mandatory at least one file in the file sublist beforeSubmit the new record.
a
I don’t remember if files are a sublist or an individual record that works via attach in which case you may have an interesting problem. Maybe you can’t check if the file was added via a sublist operation but you may be able to do so via a search afterSubmit to check if there is a file attached to the created record and you may be even able to redirect the customer to the created record in Edit mode and show a message saying a file must be attached or added…
e
I think thats the crux... Doesn't appear to be a sublist
e
I remember trying and giving up on figuring out "what files are attached to this new record" a few months back.
e
The need comes from an approval workflow: the approvers need to check the files. My dirty hack is to let the user create the record. Then, check if any file is attached. If any, continue to the first approver. If no file is found, then stop the workflow and notify the user. When a file is attached, show the button to "Submit for Approval". Lots of work for a simple use case.
Hi eric! I owe you at least a coffee... your knowledge has saved me on more than one occasion. Thanks for al the support to the NS community 🙂
❤️ 1