How to hide Compose Email in HR Agent Workspace?

miro2
Mega Sage

Hi,

Does anyone know if there is an option to hide the 'Compose Email' in Workspace? The onload script hides the email icon in UI16. I'm looking for a similar implementation to do the same in HR Agent Workspace. In my use case, when the HR case state is 'Closed Complete,' the agent shouldn't be able to send emails.

 

miro2_0-1715980768655.png

 

function onLoad() {
    var caseState = g_form.getValue('state');
    if (caseState == '3') // Closed complete
    {
        $('email_client_open').hide();
    }
}

 

I tried to control it via the email client attribute set to false, but I can't control it conditionally (when the HR Case state changes to 'Closed Complete'). With this attribute, I can only hide compose email when it is set to false.

 

miro2_1-1715981238071.png

 

14 REPLIES 14

Hi @Sid_Takali thanks for your reply
Provided solution is for hiding UI Action "Compose email" and this is fine. 
But do you know where I can find configuration to hide the Compose email section? It seems like a UI builder component, but I can't find an option to conditionally hide it (when a case is closed).

miro2_0-1716026511858.png

 

Hi @miro2 I believe you can deactivate it from UI Builder. I didn't have installed HR Agent Workspace in my PDI.

Refer below documents it will help you 

https://www.servicenow.com/community/developer-forum/ui-builder-compose-email-component-configuratio... 

https://developer.servicenow.com/dev.do#!/reference/next-experience/vancouver/now-components/now-ema... 

Gangadhar Ravi
Giga Sage
Giga Sage

I don't think you can remove that from record page. 

Navigate to the table dictionary for the tables you want to hide it on. Set Email client to false in the attributes.

GangadharRavi_0-1716041125708.png