Pop-up Function in Salesforce.com | Techila
1325
single,single-post,postid-1325,single-format-standard,ajax_updown_fade,page_not_loaded,,qode_grid_1300,footer_responsive_adv,hide_top_bar_on_mobile_header,qode-content-sidebar-responsive,qode-theme-ver-9.4.2,bridge,wpb-js-composer js-comp-ver-4.12,vc_responsive
 

Pop-up Function in Salesforce.com

rtaimage

Pop-up Function in Salesforce.com

As we mostly try to redirect the current page to another page for viewing the data or for displaying the requested or required field
But it is much easier & feasible to display the data on the same page using popup window.
It separates the information & it also looks goods in the terms of design
Sample code :
public with sharing class TestPopup
{
public Boolean displayPopup {get;set;}
public TestPopup(ApexPages.StandardController controller)
{
}
public void showPopup()
{
displayPopup = true;
}
public void closePopup()
{
displayPopup = false;
}
public PageReference redirectPopup()
{
displayPopup = false;
// Please uncomment below 3 statements and replace YourObjectId
PageReference p=new Pagereference(‘/’+YourObjectId);
p.setRedirect(true);
return p;
}
}

Courtesyhttps://developer.salesforce.com/forums/ForumsMain?id=906F000000097X9IAI

Author: techila

No Comments

Post A Comment