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

How to imitate the custom button & scontrol iframe in VF?


I use the below VF code to open an s-control in an iframe - similar one does using custom button & s-control in standard sf page. However I cannot add the custom button in VF to get the same behavior.

So I use commadButton and return reference to new VF page with scontrol tag as in below code. However this is not as flexible - it is inline and static size. E.g. It does not react on sidebar collapse which is not nice. VF iframe tag doesnt seem to work as I cannot feed object id.

Any suggestions / workarounds?

<apex:page standardController="Offer__c" extensions="offerPage" tabStyle="Offer__c">

<apex:scontrol controlName="ListBtn" height="800" width="1000" subject="a06T0000001p2Q0"/>