Uncheck and Disable 'Creation of Mailbox' option in Contact creation wizard

Hello,

I'm have tried below script in policy to uncheck and disable 'Create a mailbox' option in the contact creation wizard but its not reflecting on the screen.

function onGetEffectivePolicy($Request)
{
if($Request.Class -ne "contact"){return}
$Request.ClearEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_AUTO_GENERATED)
$Request.ClearEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_GENERATED_VALUE)
$Request.SetEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_GENERATED_VALUE, $FALSE)
$Request.SetEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_AUTO_GENERATED, $FALSE)
}

When I check the wizard checkbox is disabled but its not greyed out.

Thanks you

Parents Reply Children
  • I've added the line but no luck

    function onGetEffectivePolicy($Request)
    {
    if($Request.Class -ne "contact"){return}
    $Request.ClearEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_AUTO_GENERATED)
    $Request.ClearEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_GENERATED_VALUE)
    $Request.SetEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_GENERATED_VALUE, $FALSE)
    $Request.SetEffectivePolicyInfo("edsaEstablishEmail", $Constants.EDS_EPI_UI_AUTO_GENERATED, $FALSE)
    $Request.SetEffectivePolicyInfo('edsaEstablishEmail', $Constants.EDS_EPI_UI_RESTRICTED , $true)
    }