Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Customer field in Case not Showing "New" button

$
0
0

Hi all,

Per business requirements we need to restrict the Customer field in Case to only show Contact records and only allow for the creation of Contact records. We achieved this through the following simple Javascript:

function (executionContext) {
    var lookup = executionContext.getformContext().getControl("customerid");
    if (lookup) {
        if (lookup.getEntityTypes().length > 1) {
            lookup.setEntityTypes(["contact"]);
        }
    }
}

This code correctly locks the Customer lookup to just Contacts; however, after enabling this script the +New Contact button no longer appears.

If the script is disabled, the button returns, and the user is able to create Contacts and Accounts.

Permissions are properly set so it should be visible, but it's not. Does anyone know what might be going wrong? It used to work and now suddenly does not. Thanks.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>