Blueprint - Mandatory file upload field
Hi,
File upload (as we as image upload) field cannot be set as mandatory during a blueprint transition.
Is there a workaround?
Setting attachments as mandatory doesn't solve this need as we have no control over which attachments are added, nor can we classify them.
Thanks
Moderation Update:
We've shared the possible workaround using Widget in the linked post below, and we're sharing the same for your convenience.
Please refer to the sample code and the steps shared below:
- if (transition.id === "419602000032426558") // Respective blueprint transition Id
- {
- var response = ZDK.Client.openPopup({
- api_name: 'widget_api_name', type: 'widget', header: 'File Upload', animation_type: 4, height: '300px', width: '1000px', top: '0', close_icon: false
- });
- if (response.status === "Cancel") {
- return false; // prevents the blueprint transition
- } // Status returned from the widget
- }
- Create a BluePrint beforeTransition event in the client script.
- Create a button widget with the necessary file upload field.
- From the client script use the openPopup event to open the widget for the respective blueprint transition.
- Based on a successful file update response from the widget. Use $Client.close() method to return success/failure status from the widget to client script.
- Based on the widget response, return true/false in the client script to move forward/prevent the transition.
Feature Request - The ability to make the ' File upload/Image Upload field mandatory within the blueprint. We're yet to support this feature and we will keep you posted here for future updates.