<h2>How to hide email mini compose in workspace based on the condition</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Summary</h3><section><ul style="list-style-position: inside;"><li style="font-size: 10pt;"><span style="font-size: 10pt;">Need to disable the email mini compose in workspace based on the condition</span></li></ul></section></div><div ><h3 >Release</h3><section><ul style="list-style-position: inside;"><li style="font-size: 10pt;"><span style="font-size: 10pt;">ALL</span></li></ul></section></div><div ><h3 >Instructions</h3><section><ul style="list-style-position: inside;"><li style="font-size: 10pt;"><span style="font-size: 10pt;">Navigate to UI builder --> Record page</span></li><li style="font-size: 10pt;"><span style="font-size: 10pt;">Click on 'Activity Stream Compose' node</span></li><li style="font-size: 10pt;"><span style="font-size: 10pt;">In Config section --> Expand Advanced --> 'Show email mini compose'</span></li><li style="font-size: 10pt;"><span style="font-size: 10pt;">Use Script action to add below script that checks the field value and hide the email component if the condition fails.</span></li></ul> <p style="font-size: 10pt; padding-left: 80px;"><span style="font-size: 10pt; color: rgb(224, 62, 45);"><em>If(api.data.record.form.fields.<field_name>.value== 'value')</em></span></p> <p style="font-size: 10pt; padding-left: 80px;"><span style="font-size: 10pt; color: rgb(224, 62, 45);"><em>return 'ALWAYS';</em></span></p> <p style="font-size: 10pt; padding-left: 80px;"><span style="font-size: 10pt; color: rgb(224, 62, 45);"><em>else</em></span></p> <p style="font-size: 10pt; padding-left: 80px;"><span style="font-size: 10pt; color: rgb(224, 62, 45);"><em>return 'NEVER';</em></span></p></section></div></article></div>