You need to sign in to do that
Don't have an account?
sundhar.mks1.3962649227519546E12
How to remove the hyperlink in the ‘Lookup’ filed?
Hi
How to remove the hyperlink in the ‘Lookup’ filed for particular profile Name only. I have used the java script and get the Element ID to using the style in Java script, but I can't remove the Hyperlink in that Lookup field. Kindly share your knowledge about this.
My code : var x = document.getElementsById("lookupa05f0000006ljSZ00ND0000005EdfF").style.pointerevents="none";
Thanks in Advance
How to remove the hyperlink in the ‘Lookup’ filed for particular profile Name only. I have used the java script and get the Element ID to using the style in Java script, but I can't remove the Hyperlink in that Lookup field. Kindly share your knowledge about this.
My code : var x = document.getElementsById("lookupa05f0000006ljSZ00ND0000005EdfF").style.pointerevents="none";
Thanks in Advance
You can remove this using jquery because you will get instance of id after page load.
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
All Answers
Please see if the below link which has the code helps you
http://stackoverflow.com/questions/9101678/removing-the-link-from-a-visualforce-lookup-field-output
Best Regards
Naga kiran
The solution is to use Name in output text instead if reference Id there...
Check the below post which can help you for the same..
http://stackoverflow.com/questions/9101678/removing-the-link-from-a-visualforce-lookup-field-output
http://salesforce.stackexchange.com/questions/5896/removing-look-up-field-link-in-visualforce-page
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanks,
Sandeep
Salesforce Certified Developer
You can remove this using jquery because you will get instance of id after page load.
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
I have added my lookup id in my sample code so you need to replace that with your lookup. I hope that should not be problem for you.
Thanks,
Himanshu
Thanks for your Responce, Is this possible to without jquery? How to achive this in javascript?
Please find equivalent javascript code
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanksyou so much, I have removed using jquery
<apex:page standardController="Quote" showHeader="false" sidebar="false" id="quotePage">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $( document ).ready(function() { var accountid='{!Quote.AccountId}'; var oppid='{!Quote.OpportunityId}'; var insidetext = $("#lookup"+oppid.substring(0,15)+"quotePage_QuoteDetailOpportunity").html(); $("#lookup"+oppid.substring(0,15)+"quotePage_QuoteDetailOpportunity").parent().text(insidetext); var insidetext = $("#lookup"+accountid.substring(0,15)+"quotePage_QuoteDetailAccount").html(); $("#lookup"+accountid.substring(0,15)+"quotePage_QuoteDetailAccount").parent().text(insidetext); }); </script>
<apex:detail relatedList="false" title="true" id="QuoteDetail"/>
</apex:page>
Option 2: Formula fields(Oppty.Account.Name) or (Oppty.Name) is another option without any js code. but it will not works the field is required field in the standard layout(Oppty field is required in Quote Std Layout)