Set potential customer look up field to only for contact entity record.
By default out of the box functionality gave a pop up with two entity type -contact & account for customer lookup field ,
if your requirement is to set only contact or only account as entity it can be done using javascript as given below ,
Both Contact and Account are viewed by Default |
Only Contact records are views |
Only Contact is selected and read only |
Both account and contact shown by default |
function disableaccountfromcustomer() {
debugger;
//timeout of 1sec
setTimeout(function () {
debugger;
var getid = $(‘#customerid_i’); //customer field id contain account and contact both view
getid .attr(‘defaulttype’, ‘2’); // default advance find entity type to contact
getid .attr(‘lookuptypes’, ‘2’); //change lookup view to contact
}, 1000);
}
SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012