You need to sign in to do that
Don't have an account?
MSVRad
List Button - Cannot view in new window?
Is there a reason I cannot have a custom button display in a new window without having to write JavaScript for it to happen? Is there a workaround for this? My users would like to be able to view the page they are on and have another window open when they click on the list button.
I have a created a custom List button containing a visualforce page and want to display it in a separate window from the page that is already on display.
Any suggestions?
Hi - have you succeed on this? What is the work around?
Thanks
Hi, is there a solution for this?
Thanks
Hi, I tried to use javascript to open the page in a new window, but it does not display any result. Any idea why?
My VF page is:
<apex:page standardController="Milestones__c" recordSetVar="unused" showHeader="true" > <apex:includeScript value="{!$Resource.UtilJS}" /> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlock > Note: All modifications made on the page will be <b>LOST </b> if Return button is clicked without clicking the Save button first. </apex:pageBlock> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Return" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!selected}" var="a" id="table"> <apex:column headerValue="Milestone#"> <apex:outputField value="{!a.name}"/> </apex:column> <apex:column headerValue="Milestone Activity"> <apex:outputField value="{!a.Milestone__c}"/> </apex:column> <apex:column headerValue="Sales Stage"> <apex:outputField value="{!a.Stage__c}"/> </apex:column> <apex:column headerValue="Probability"> <apex:outputField value="{!a.Probability__c}"/> </apex:column> <apex:column headerValue="Achieved?"> <apex:inputField value="{!a.Achieved__c}"/> </apex:column> <apex:column headerValue="Date Achieved"> <apex:inputField value="{!a.Date_Achieved__c}"/> </apex:column> <apex:column headerValue="Note"> <apex:inputField value="{!a.Notes__c}" style="width: 200px" /> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
If I open this page in the same window(create a list button (URL type)), it can displayed selected records. But if user click cancel it cannot go back to the original page so I want to open it in a new window.
but if I create a button using javascript(window.open('/apex/...), it cannot display any record.
Any comment is appreciated.
Somebody solve this??
You must select "Behavior: Execute JavaScript"
Then add Javascript listed below. Replace url with your url.
window.open("url")