+ Start a Discussion
Amit  TrivediAmit Trivedi 

How to hide standard user type picklist value

User-added image

Hi guys  I need to remove customer portal user from standard user look field and only show User and Partner user.Can you please suggest some solution to achieve it.
Best Answer chosen by Amit Trivedi
Amit  TrivediAmit Trivedi
Hi  i resolved it using below

<script type='text/javascript' src= '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'> </script> <script language="javascript"> $(function() { console.log($('.abc select')); $('.abc select').children("option:nth-child(1)").remove(); $('.abc select').children("option:nth-child(1)").remove(); }); </script>
 

All Answers

ra811.3921220580267847E12ra811.3921220580267847E12
Hi,
Using Jquery Unhide function.

it will hide.

thank you
Amit  TrivediAmit Trivedi

<script type='text/javascript' src= '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'> </script> <script language="javascript"> $(function() { $('select.RemoveNone option[value=]').remove(); }); </script>

i have tried this but its not working
ra811.3921220580267847E12ra811.3921220580267847E12
Hi, Try this
<script type='text/javascript' src= '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'> </script> <script language="javascript"> $(function() { $('select.RemoveNone option[value='USER']').remove(); }); </script>
Amit  TrivediAmit Trivedi
Hi its not working because it is standard salesforce user type picklist
ra811.3921220580267847E12ra811.3921220580267847E12
Hi,
Yes it is standarad picklist value only, your javascript code is calling. please chk by putting alert box.( javascript code is calling or not)
Amit  TrivediAmit Trivedi
yes i have tried javascript code is calling but not working
Amit  TrivediAmit Trivedi
Hi  i resolved it using below

<script type='text/javascript' src= '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'> </script> <script language="javascript"> $(function() { console.log($('.abc select')); $('.abc select').children("option:nth-child(1)").remove(); $('.abc select').children("option:nth-child(1)").remove(); }); </script>
 
This was selected as the best answer
Jac UyJac Uy
Try with CSS:

<style>
    select[id$='mlktp'] {display:none;}
</style>
HNT_NeoHNT_Neo
Hi Amit, 
Where do you place the script on a standard lightning page? Or should a custom lightning component be created along with a custom lighthing page to hold the default user page details?