function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Hide fields via URL parameters

I have custom button of URL type where in I pass some field values, record type etc as shown below{!ABC__c.Name}&CF00N20000002oGtq_lkid={!ABC__c.Id}&00N20000002o7Mi=Bus+Conversion&RecordType=01220000000AGAR


In this URL, can i make a field "Orders" hidden/invisible. I dont want Orders field to be displayed completely.  Is there any way can I do that in the URL. (like 00N20000002o7Mi:hidden or anything else)


Please let me know, if its possible or any other alternative.


P.S: I dont want to create a new record type and new page layout with no Orders field in it.

Chris JohnChris John

You could pass in a parameter to control the display of the orders, e.g:



Then in your controller, write a method that reads the value from the query string and returns a true/false boolean, e.g:


public boolean getShowOrders() {
        return ApexPages.currentPage().getParameters().get('showOrders') != null 
            && ApexPages.currentPage().getParameters().get('showOrders').equals('true');   

Finally, in your Visualforce page where you render the orders, set the rendered attribute to the showOrders boolean, e.g:


<apex:outputField value="{!Account.Order__c}" rendered="{!showOrders}"/>


Thanks for the reply.


But i am not using any visualforce page.  I am just overriding a standard list button with custom button in pagelayout and passing some values to pre-populate in the standard page.


I have no VF code.



Ankit AroraAnkit Arora

Don't think you can hide these Ids, and at max you can do is use "{!URLENCODE}" to encode your URL.




Ankit Arora

Blog | Facebook | Blog Page


There's no such thing as URL/parameter-based field hiding/disabling/etc. You'd have to use Visualforce or a record type.